Find Jobs
Hire Freelancers

R5RS Algorithm Complexity

$30-250 USD

Fullført
Lagt ut over 5 år siden

$30-250 USD

Betalt ved levering
This project must be completed in R5RS ([login to view URL]) dialect of Scheme. I also require a written description of the algorithm and its complexity. I invite you to write a function has-subtarget? that takes a list of three or more positive integers, duplicates are possible and 0 is not included, and returns true (#t) if there are two non-empty sublists whose sums are both equal to a value in the list that is not part of either sublist. False (#f), if no two such sublists exist. The values of the sublist do not need to be contiguous in the original list. Not all values need to be used. In other words, values can belong to either sublist or neither sublist. They cannot, however, belong to both sublists at the same time. The list passed to has-target-num? is flat, i.e., it does not itself contain sublists. It is up to you to choose the auxiliary parameters that has-target-num? takes. Auxiliary parameters are parameters used to help find the solution and are scalar. In other words, they hold single values not a collection of values. The list parameter is mandatory is not an auxiliary parameter. All auxiliary parameters must be numeric and must be initialized to zero when the function is called. There may be more than two values that have two sublists or more than two sublists that equal some value. In both cases a single true (#t) should be returned. The whole code solution must be packed into one recursive function, has-subtarget?, which must look as follows: (define has-subtarget? (lambda (<list L followed by your auxiliary parameters of your choice>) (cond … )))
Prosjekt-ID: 18221364

Om prosjektet

3 forslag
Eksternt prosjekt
Aktiv 5 år siden

Ønsker du å tjene penger?

Fordeler med budgivning på Freelancer

Angi budsjettet og tidsrammen
Få betalt for arbeidet ditt
Skisser forslaget ditt
Det er gratis å registrere seg og by på jobber
Tildelt til:
Brukeravatar
Hello Sir, I am a computer science tutor, I teach (among others) Scheme R5RS, Racket, LISP, Haskell, and Advanced Algorithms. I have done many projects like this, and I'm one of the top Scheme developers, and you can check by clicking on my profile picture. Please contact me for more details when possible. I look forward to work for you, Sir. Best Regards.
$90 USD om 3 dager
4,9 (106 omtaler)
6,5
6,5
3 frilansere byr i gjennomsnitt $148 USD for denne jobben
Brukeravatar
(3-sum '(2 (3 (4 (2 34))) ((6 (18) 3 5)) (29 3) 8)) (3-sum '((3 (4 (2 34))) ((6 (18) 3 5)))) (3-sum '(0 (3 (4 (2 34))) ((6 (18) 3 5)) (29 3) 8)) 117 "Smaller-List" "Start-by Zero" I thing you want something like : for (has-subtarget? '(2 34) '(2 (3 (4 (2 34))) ((6 (18) 3 5)) (29 3) 36)) return #t but (has-subtarget? '(29 3) '(2 (3 (4 (2 34))) ((6 (18) 3 5)) (29 3) 36)) return #f if the upper functions are right then please tell me. i already computed the sum for plain list and tree list as well and also completed some sort of constraints you depicted.
$200 USD om 3 dager
0,0 (0 omtaler)
0,0
0,0

Om klienten

UNITED STATESs flagg
Poplar Grove, United States
5,0
6
Betalingsmetode bekreftet
Medlem siden des. 4, 2017

Klientbekreftelse

Takk! Vi har sendt deg en lenke for at du skal kunne kreve din gratis kreditt.
Noe gikk galt. Vær så snill, prøv på nytt.
Registrerte brukere Publiserte jobber
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Forhåndsvisning innlasting
Tillatelse gitt for geolokalisering.
Påloggingsøkten din er utløpt og du har blitt logget ut. Logg på igjen.