Solved


Simulating the selection of a state with given probabilities
Lets say we have 3 different states [1,2,3] with the probabilities of occurrences of each state is given as [0.5 0.2 0.3]. Which...

10 years ago

Solved


Unique dice configurations
Given a number of dice N and the number of sides on each die S, write a MATLAB function that will output how many unique permuta...

10 years ago

Solved


The cake is a lie...
You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front...

10 years ago

Solved


Set a Soroban Abacus
*Description* This problem is the inverse of <http://www.mathworks.com/matlabcentral/cody/problems/136-read-a-soroban-abacus ...

10 years ago

Solved


Number of paths on a grid
Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

10 years ago

Solved


Knave in the middle attack
This is a Matlab adaptation of the <http://en.wikipedia.org/wiki/Knights_and_Knaves Knives and Knaves> logical puzzles, mixed wi...

10 years ago

Solved


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

10 years ago

Solved


Disjunctive Normal Form
This problem is the companion to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1484 1484>. In Boolean logic, a f...

10 years ago

Solved


The almost-birthday problem.
This is a harder version of the birthday problem. Now, you will have to determine the probability that two or more people in a r...

10 years ago

Solved


Hamiltonian Cycle
This is related to the Travelling Salesman Problem <http://www.mathworks.com/matlabcentral/cody/problems/1339 1339> created by...

10 years ago

Solved


Find the day for a date
Today's day and date will be given to you. By utilising that you need to find the day of the old date. (Date will be in DD/MM/YY...

10 years ago

Solved


Get top 5 Cody Player Emails Automatically
Yes, this is a little scary and also entirely possible to do in MATLAB, so let's do it! Looking at the list of the players <h...

10 years ago

Solved


Tic-Tac-Logic - Solution Checker
<http://www.conceptispuzzles.com/index.aspx?uri=puzzle/tic-tac-logic/rules Tic-Tac-Logic> is a logic puzzle wherein a rectangula...

10 years ago

Solved


Usage of java.math : N Choose K with unlimited precision
Calculate the binomial coefficient nchoosek with full accuracy. This challenge may use the wonderful word of java.math that allo...

10 years ago

Solved


Backslang, odds are you used it at some point in time...
So backslang is a language that can be used to communicate in an easy decode code, if people know the rules of decoding it. Wel...

10 years ago

Solved


Cosine frequency doubler
Given an input vector containing a cosine wave of unknown frequency, produce an output vector of the same length containing a co...

10 years ago

Solved


Signal filtering
You are given a vector, containing a superposition of target signal and white gaussian noise. Return a vector, containing the es...

10 years ago

Solved


Looking for Squares
Need n squares that equal one square all together, none zero, none fractured. For example, calling squares(2) should output [16...

10 years ago

Solved


Backward Substitution
Solve a upper triangular linear set of equations as described in the following link: http://www.people.virginia.edu/~teh1m/cody/...

10 years ago

Solved


Simple Past of Regular Verbs
Given a regular verb, return the simple past. Example Input verb = 'to work' Output simple_past = 'worked'

10 years ago

Solved


Factorial: Unlimited Size : java.math
This challenge is an application of java.math that allows unlimited precision calculations. The primary reference sites are <ht...

10 years ago

Solved


Usage of java.math : Add, Multiply, Pow
This challenge is an introduction to the wonderful word of java.math that allows unlimited precision calculations. The primary ...

10 years ago

Solved


Have you seen any Spindromes recently?
* Never been to the <http://en.wikipedia.org/wiki/Makemake_(dwarf_planet) dwarf planet makemake> yet? * Assume a new unexplore...

11 years ago

Solved


Legendre polynomials
Given an integer _n_ &ge; 0, generate the _n_-th <http://en.wikipedia.org/wiki/Legendre_polynomials Legendre polynomial>. *Ex...

11 years ago

Solved


The Python Challenge, Level 1: Decode strings
This problem is based on <http://www.pythonchallenge.com/pc/def/map.html Level 1 of The Python Challenge>, which is just a serie...

11 years ago

Solved


Josephus Survivor
The <http://en.wikipedia.org/wiki/Josephus_problem Josephus Challenge> is to find the position that is the last remaining when e...

11 years ago

Solved


Pig Latin to English Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the <http://en.wikipedia.org/wiki/Pi...

11 years ago

Solved


Eliminate Polysyllabics: Long live short words!
Given a string s1, return s2 in which all the words with more than one syllable have been removed. To make things simple, we ...

11 years ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

11 years ago

Solved


Numbers at bit-boundary
Find if a number is on or below the bit-boundary, as defined below. Examples 7,9 straddle the bit-boundary at 2^3 as do 31...

11 years ago

Load more