Reference no: EM131041907
A binary mobile consists of two branches, a left branch and a right branch. Each branch is a rod of a certain length, from which hangs either a weight or another binary mobile. We can represent a binary mobile using compound data by constructing it from two branches (for example, using list):
A branch is constructed from a length (which must be a number) together with a structure, which may be either a number (representing a simple weight) or another mobile:
(define (make-branch length structure) (list length structure))
Write the corresponding selectors left-branch and right-branch, which return the branches of a mobile, and branch-length and branch-structure, which return the components of a branch
b. Using your selectors, define a procedure total-weight that returns the total weight of a mobile.
c. A mobile is said to be balanced if the torque applied by its top-left branch is equal to that applied by its top-right branch (that is, if the length of the left rod multiplied by the weight hanging from that rod is equal to the corresponding product for the right side) and if each of the submobiles hanging off its branches is balanced. Design a predicate that tests whether a binary mobile is balanced.
d. Suppose we change the representation of mobiles so that the constructors are
How much do you need to change your programs to convert to the new representation?
Creating shared meaning with the receiver of message
: Creating shared meaning with the receiver of a message is what organizational communication is all about. Choose and respond to ONE of the following statements below. Explain whether you agree or disagree. Describe how a different perspective from so..
|
Provides an overview of the company business
: Summary is brief, provides an overview of the company's business, and outlines main points of the report. Identify top risks for the company and the probabilities
|
How much interest is paid the first month
: Consider a $48,668, 31 year mortgage at interest rate 12% compounded monthly with a $499 monthly payment. a) How much interest is paid the first month?
|
What do you think about forgiveness
: It's easy to have compassion for the loss suffered by the parents of the murdered teens, but do you think the execution of the children's murderer will really give them peace? What do you think will help these parents? Is bitterness and anger their o..
|
A binary mobile consists of two branches
: A binary mobile consists of two branches, a left branch and a right branch. Each branch is a rod of a certain length, from which hangs either a weight or another binary mobile. We can represent a binary mobile using compound data by constructing i..
|
Extent of job growth-summarizing the pressures
: Extent of Job Growth. To what extent is the renewed job growth in the automobile industry in the United States due to the use of the two-tier wages? Summarizing the Pressures. Will the two-tier wage structure go away in the near future? Summarize the..
|
Anticipation of the disclosure in advance
: Is the information incorporated into price quickly? Is there any evidence of prior knowledge or anticipation of the disclosure in advance of the trading?
|
Factors influencing internal pay structures
: Importance of Internal Alignment. Why is internal alignment an important policy in a strategic perspective of compensation? How is internal alignment supported or not supported by a Christian worldview? Factors Influencing Internal Pay Structures. Di..
|
Identify key purchasing - supply management issues
: ASCM 626: Purchasing and Materials Management - determine and identify the key issues and explain how to manage these issues.
|