100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Problem Set 9 - UBC 2024 - CPSC 110 CA$10.86   Add to cart

Class notes

Problem Set 9 - UBC 2024 - CPSC 110

1 review
 476 views  2 purchases

Completed file for problem set 9. Remember to copy the pdf file to Dr Racket for a better view. This file should be exactly identical except that the file has answers for each problems.

Preview 2 out of 7  pages

  • December 20, 2022
  • 7
  • 2022/2023
  • Class notes
  • Gregor kiczales
  • All classes
All documents for this subject (19)

1  review

review-writer-avatar

By: zheyuanfan • 2 weeks ago

avatar-seller
tranghane
;; DO NOT PUT ANYTHING PERSONALLY IDENTIFYING BEYOND YOUR
CWL IN THIS FILE.
;; YOUR CWLs WILL BE SUFFICIENT TO IDENTIFY YOU AND, IF YOU HAVE
ONE, YOUR
;; PARTNER
;;

(require spd/tags)

(@assignment psets/pset-09);Do not edit or remove this tag

;; If you are:
;; - A 110 or 107 student replace the first set of '???'s with your cwl.
;; For problem sets, If you have a partner, please replace the second
;; set of '???'s with their cwl. Remember this, it is what you will
;; do with these @cwl annotations for the whole course.
;; - A UBC Extended Learning student, replace the first set of ??? with
;; your email address as confirmed in the email you received from
;; extended learning. The handin password is also in that email.
;; Remember this, it is what you will do with these @cwl annotations
;; for the whole course.
;;
(@cwl ??? ???)

;;
;; THIS IS THE MOST CHALLENGING PROBLEM SET SO FAR THIS TERM.
PLEASE BE
;; SURE YOU WORK THROUGH IT CAREFULLY THOUGH. 110 FINAL
EXAMS OFTEN INCLUDE
;; PROBLEMS BASED ON PROBLEM SETS 9, 10, OR 11.
;;
;; ALSO NOTE THAT THE AUTOGRADER COOL DOWN IS 1 HOUR FOR
THIS PROBLEM SET.
;;
;; THERE WILL BE A SPECIAL PINNED THREAD ON PIAZZA IN WHICH WE
WILL ANSWER
;; QUESTIONS ABOUT THIS PROBLEM SET.
;;
;; In this problem set you are going to work on one of the toughest problems
;; we face running 110 - scheduling of TAs. As you may know, we have about
;; 45 TAs, and we have to schedule them for many labs, 3 lectures, and office

, ;; hours. We solved this by writing a schedule solver, and that's what you
;; are going to do for this problem set.
;;
;; We are making it a little easier for you, in that all you will be having
;; to deal with is labs.
;;
;; We are giving you two key data definitions, as well as some examples of
;; that data. We are also giving you a wish list entry for the main solve
;; function you have to design. The function consumes a list of TAs and a
;; list of lab slots to fill. It produces a list of assignments. So, for
;; example, in the following very simple case, where there are two slots,
;; and two TAs, you get an assignment of the TAs to those slots.
;;
;; (solve (list (make-slot "A" 1) (make-slot "B" 1))
;; (list (make-ta "Ali" (list "B"))
;; (make-ta "Azi" (list "A")))) ==>
;;
;; (list (list "Ali" "B") (list "Azi" "A"))
;;
;; In this simple example there was only one possible assignment. But in
;; general there might be more than one assignment, or it might be impossible
;; to generate an assignment.

;; By now you know enough about search to know that the first thing you need
;; to do is figure out the search space. What does the tree look like? What
;; information do you have to represent at each node in the tree? How do you
;; generate the next nodes in the tree? How do you tell you have a solution?
;; Although this function ends up producing just a list of assignments, does
;; it need more than just the assignments so far at each node in the tree?
;; What other information do you need to represent at each node?
;;
;; As you consider the search tree, note that a TA can work more than one slot,
;; but a slot is filled by one TA. So once you assign a TA to a slot that slot
;; is done.
;;

;; As usual, anything we give you below you must not change. The autograder
;; will want to call solve with arguments as described below. Also note that
;; we give you just a few small data examples for illustration. You will want
;; to test your function with additional examples.
;;

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller tranghane. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for CA$10.86. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

60904 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
CA$10.86  2x  sold
  • (1)
  Add to cart