Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SML pls. Goldbach's conjecture says that every positive even number greater than 2 is the sum of two prime numbers. Write an SML function goldbach
SML pls.
Goldbach's conjecture says that every positive even number greater than 2 is the sum of two prime numbers. Write an SML function goldbach that takes a single positive, even integer as its parameter and returns a list containing the two prime numbers that sum to the parameter. You may assume that the parameter is a positive, even integer. Examples:
goldbach(4000) would return [11, 3989] or [3989, 11]
goldbach(3818) would return [79, 3739] or [3739, 79]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started