Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Handbook Of Relational Database Design

Authors: Candace C. Fleming, Barbara Von Halle

1st Edition

0201114348, 978-0201114348

More Books

Students also viewed these Databases questions

Question

2 What are the implications for logistics strategy?

Answered: 1 week ago