Problem 58019. Factor a number into Fermi-Dirac primes
Solution Stats
Problem Comments
-
4 Comments
What should be the output for numbers such as 256?
[4 64]? [16 16]?
Or 1024?
[4 256]? [4 4 64]? [4 4 4 16]? [16 64]? [4 16 16]?
Does it have to be a particular pairing(s)? If yes, how so?
Or will any/all of them work?
@Dyuman Here's my two cents:
256 = [256]. [4 64] is not valid since 64 is not a prime power where the exponent is a power of two. [16 16] is out since - I assume - you're supposed to simplify as much as possible. Same for [2 2 2 2 2 2 2 2], [4 4 4 4] and so on. But you're right that this additional requirement is needed to ensure uniqueness.
1024 = [4 256] using the same reasoning.
I added the requirement that the FD primes appear in the factorization at most once. This requirement resembles a difference between the Fermi-Dirac and the Bose-Einstein distributions of particles.
Solution Comments
Show commentsProblem Recent Solvers8
Suggested Problems
-
25957 Solvers
-
Back to basics 12 - Input Arguments
604 Solvers
-
Find a subset that divides the vector into equal halves
390 Solvers
-
811 Solvers
-
Remove entire row and column in the matrix containing the input values
407 Solvers
More from this Author291
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!