已解决


Word Ladder
Given a set of words, and two other words - start and destination, Find the smallest chain from start to the destination such...

2 months 前

已解决


Sub-sequence - 01
Find the length of the longest increasing subsequence in the given array. a=[2,4,2,1,3,5,6] longest increasing subsequen...

2 months 前

已解决


Kolakoski Sequence
This is a modified version of the kolakoski sequence. Refer to the problem <https://www.mathworks.com/matlabcentral/cody/p...

2 months 前

已解决


Quarantine Days
In these quarantine days, a list of what Max may do on a typical day is given in a table with the starting hour to ending hour. ...

2 months 前

已解决


Coin Distribution - 02
Prev prob <https://www.mathworks.com/matlabcentral/cody/problems/45385-coin-distribution> Given a set of coins and an amount,...

2 months 前

已解决


Linear primes p' = mp + n
Problem statement List the prime numbers of the form p' = mp + n for a given (m,n) couple and such that p' < k, k positive in...

2 months 前

已解决


List the complementary / symetric prime couples
Problem statement For a given positive integer n, provide the prime couples (p,p') such that p + p' = 10^n. NB : a number li...

2 months 前

已解决


Check Legendre's conjecture
Context and problem statement Legendre's conjecture states for a given positive integer n, there always exists at least one pri...

2 months 前

已解决


List the twin prime couples
Problem statement The twin prime couples (p,p') are the ones such that p' = p + 2. For a given integer n > 1, list the twin p...

2 months 前

已解决


Check Bertrand-Chebyshev's theorem about prime numbers
Historical context Bertrand's postulate, also later known as Chebyshev's theorem, is a very important theorem in number theory ...

2 months 前

已解决


Evaluate Deterministic Finite Automata on String
Given a Deterministic Finite Automata (DFA) and a string, determine whether or not the DFA will accept when ran on the string. A...

2 months 前

已解决


List the near-square primes, p = n² + 1 (Landau's 4th problem)
Historical context At the 1912 International Congress of Mathematicians, Edmund Landau listed four basic problems about prime...

2 months 前

已解决


List primes which are the sum of two consecutive lower primes plus minus one
Problem statement Some prime numbers can be written as the sum of two consecutive lower primes plus / minus one : Like t...

2 months 前

已解决


Check p = 6n +/- 1, the generic formula for odd prime numbers greater than 3
Problem statement For all odd prime number p greater than 3, there exists a positive integer n, such that p = 6n +/- 1 : ...

2 months 前

已解决


Check p = 4n +/- 1, the generic formula for odd prime numbers
Problem statement For all odd prime number p, there exists a positive integer n, such that p = 4n +/- 1 : Check this f...

2 months 前

已解决


Determine if LTI system with feedback control is stable
Linear timeiinvariant systems can be represented by the differential equation , where is an matrix, is an vector representing...

2 months 前

已解决


Monkey and the Peaches
A monkey picked a certain number of peaches on the first day. Each day, the monkey eats half of the remaining peaches plus one ...

2 months 前

已解决


Chek the Delta = p' - p = 6k gap theorem about arithmetic progressions in the prime number set
Context In the prime numbers set there are some arithmetic progressions (sequences of three or more consecutive prime number...

2 months 前

已解决


List balanced primes
A balanced prime of order is one that equals the average of the primes before it and the primes after it. For example, 79 is ...

2 months 前

已解决


P(girl likes you | she smiled at you)
Compute the probability Given the input probabilities

2 months 前

已解决


List mean-of-2 primes
The prime number 53 is the average of the first prime before it (47) and the first prime after it (59), and the prime number 11 ...

2 months 前

已解决


My wife's logic
Its is always the opposite of the causality law, that is to say the opposite of the implication relationship in math/logic terms...

2 months 前

已解决


List even numbers whose Goldbach partition does not use the largest prime
The strong Goldbach conjecture says that every even number greater than 2 can be expressed as a sum of two prime numbers—that is...

3 months 前

已解决


Extra colors
Context In the RGB color system used by Matlab, the color is a 1 x 3 / row vector [R G B] with each value/component R, G, B in ...

3 months 前

已解决


Give the Shortest Path Through The Maze
*Description* The purpose of this problem is to give the shortest path through a maze. The maze will be provided in a codifie...

3 months 前

已解决


What are the odds?
Two numbers, A and B are drawn randomly and uniformly on [-R,R]. What is the probability that A*B < A+B. Your function should ...

3 months 前

已解决


Find the longest runs of primes generated by polynomials
Cody Problems 60942, 60943, and 60944 involve polynomials that generate primes. No polynomial can generate only prime numbers, b...

3 months 前

已解决


Subdivide the Segment
Two points, P1 and P2, with integer x-y coordinates are given. These uniquely determine a third point, P0, on the extended line ...

3 months 前

已解决


How many palindromes?
* Given a set of letters, count all possible palindromes, using all of those letters. * For example, if the set is {'A' 'A' 'A'...

3 months 前

已解决


Steal, Share, or Catch
You, I, and a few other characters are going to play a game of *Steal, Share or Catch*. We are going to play it 10,000 times vs...

3 months 前

加载更多