Solved


Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

ongeveer 2 jaar ago

Solved


(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

ongeveer 2 jaar ago

Solved


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

ongeveer 2 jaar ago

Solved


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

ongeveer 2 jaar ago

Solved


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

ongeveer 2 jaar ago

Solved


Is X a Fibonacci Matrix?
In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

ongeveer 2 jaar ago

Solved


Convert hex color specification to MATLAB RGB
Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...

meer dan 3 jaar ago

Solved


Choose the best fitting dominoes
You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be plac...

meer dan 4 jaar ago

Solved


Find best domino orientation
Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

meer dan 4 jaar ago

Solved


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

meer dan 4 jaar ago

Solved


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

meer dan 4 jaar ago

Solved


Find best placement for ordered dominoes (harder)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

meer dan 4 jaar ago

Solved


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

meer dan 4 jaar ago

Solved


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

meer dan 4 jaar ago

Solved


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

meer dan 4 jaar ago

Solved


Give me Hamming on five, hold the mayo
A Hamming Number is a positive number that has no prime factor greater than 5. Given a number X, determine how many Hamming num...

meer dan 4 jaar ago

Solved


Find vampire numbers
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

meer dan 4 jaar ago

Solved


Find all vampire fangs
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

meer dan 4 jaar ago

Solved


Fangs of a vampire number
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such tha...

meer dan 4 jaar ago

Solved


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

meer dan 4 jaar ago

Solved


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

meer dan 4 jaar ago

Solved


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

meer dan 4 jaar ago

Solved


Convert radians to degrees
Given input in radians, output to degrees

meer dan 4 jaar ago

Solved


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

meer dan 4 jaar ago

Solved


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

meer dan 4 jaar ago

Solved


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

meer dan 4 jaar ago

Solved


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

meer dan 4 jaar ago

Solved


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

meer dan 4 jaar ago

Solved


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

meer dan 4 jaar ago

Solved


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

meer dan 4 jaar ago

Load more