Find Jobs
Hire Freelancers

Scheme RSR5

$10-11 USD

Closed
Posted over 3 years ago

$10-11 USD

Paid on delivery
All problems are to be solved using R5RS within drracket, no vectors, no strings, no assignment ... Question: ; For this problem, we will think of 0 as a convenient substitute for a left bracket, ; and 1 as a convenient substitute for a right bracket. ; A sequence of 0s and 1s is said to be balanced if (i) every 0 is later ; closed by some 1, and (ii) every 1 closes a previous 0. ; Thus ((0 1)) is the list of all balanced sequences of length 2, and ; ( (0 0 1 1) (0 1 0 1) ) is a list of all balanced sequences of ; length 4 ; Assuming n is a positive even integer, write and prove correct ; a function bal so that (bal n) returns a list - without duplicates - ; of all balanced sequences of 0s and 1s of length n. Your program ; should be as efficient as you can reasonably make it: at the very least, it should not generate ; any unbalanced sequences in the course of computing the final result. ; (hint: you will need a carefully considered recursive design and several ; auxiliary functions; I suggest that you use structural induction)
Project ID: 28200332

About the project

Remote project
Active 3 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

About the client

Flag of UNITED STATES
South Ozone Park, United States
5.0
9
Payment method verified
Member since Nov 16, 2020

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.