Balanced Ternary Numbers: Easy as |, |-, |o
This problem concerns the so-called <http://en.wikipedia.org/wiki/Balanced_ternary balanced ternary> system for representing num...
22 days ago
Solved
Break it up! Break it up!
You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...
22 days ago
Solved
Cryptomath: Addition
W A I T
+ A L L
---------
G I F T S
equals:
9 6 0 8
+ 6 7 7
---------
1 0 2 8 5
Given str...
22 days ago
Solved
Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...
22 days ago
Solved
Guess the number I'm thinking of (Part 1)
In this game you are competing against two other people to guess the number that I'm thinking of.
I randomly choose an integer ...
Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A;
Output: A=(Aij),where each entry Aij is either...
22 days ago
Solved
Roll the Dice!
Description
Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice.
Example
[x1,x2] = rollDice(...