Find Jobs
Hire Freelancers

R5RS Algorithm Complexity

$30-250 USD

Completed
Posted over 5 years ago

$30-250 USD

Paid on delivery
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 … )))
Project ID: 18221364

About the project

3 proposals
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
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 in 3 days
4.9 (106 reviews)
6.5
6.5
3 freelancers are bidding on average $148 USD for this job
User Avatar
(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 in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Poplar Grove, United States
5.0
6
Payment method verified
Member since Dec 4, 2017

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.