Explain what the following Scheme code is doing:
(define (make-stream n f)
(define (next m)
(cons m (lambda () (next (f m)))))
(next n))
(define head car)
(define (tail stream)
((cdr stream)))
(define (nth stream n)
(if (= n 0) (head stream)
(nth (tail stream) (- n 1))))
(define even (make-stream 0 (lambda (n) (+ n 2))))
Try it out in Scheme48 and check the values of the following expressions:
even (head even) (head (tail even)) (head (tail (tail even))) (head (tail (tail (tail even)))) (nth even 5) (nth even 1000)
Explain what the lambda in make-stream is good for, where this function is called, and how tail and nth work. To see what’s going on, trace manually through the execution of
(head (tail (tail even)))
In: Computer Science
In: Math
Background: The advantage of wireless signals is that they radiate out in all directions, even penetrating walls to a certain extent. Of course, the very ability of wireless signals also causes problems.
Answer the following questions:
In: Computer Science
A gas expands from an initial volume of 4.88 L to a final volume of 6.33 L against an external pressure of 810. mmHg. During the expansion the gas absorbs 10. J of heat. What is the change in the internal energy of the gas?
In: Chemistry
An organic liquid is a mixture of methyl alcohol (CH3OH) and
ethyl alcohol (C2H5OH). A 0.220-g sample of the liquid is burned in
an excess of O2(g) and yields 0.347 g CO2(g) (carbon
dioxide).
Set up two algebraic equations, one expressing the mass of carbon
dioxide produced in terms of each reagent and the other expressing
the mass of sample burned in terms of each reagent.
What is the mass of methyl alcohol (CH3OH) in the sample?
In: Chemistry
In: Economics
List the allowed quantum numbers ml and ms for the following subshells and determine the maximum occupancy of the subshells. a) 2p b) 3d c) 4f d) 5g
In: Chemistry
Vancouver manufacturing Ltd. manufactures a variety of high quality electronic components. Data from the last three months are presented below:
|
July |
August |
September |
|
|
Direct materials partial productivity |
0.76 |
0.77 |
0.78 |
|
Overtime hours worked |
60 |
65 |
62 |
|
Defect rate |
1.00% |
0.95% |
0.92% |
|
On time delivery |
97.0% |
97.3% |
97.0% |
|
Set up time (average in hours) |
5.90 |
5.85 |
5.80 |
|
Number of machine breakdowns |
3 |
2 |
2 |
|
Downtime (hours) |
15.0 |
11.5 |
11.0 |
|
Number of products returned |
5 |
4 |
3 |
|
Throughput time (hours) |
10.0 |
9.8 |
9.5 |
You are the controller for Vancouver manufacturing and you are reviewing the performance over the last 3 months. In addition, the controller notes that the company, although it has many detailed performance measures, is considering implementing a balanced scorecard and asks you to identify the measures you think would be most appropriate to include in the balanced scorecard.
Required:
Evaluate the performance of the company and prepare a detailed Balanced Scorecard.
In: Accounting
IN PSEUDOCODE AND JAVA SOURCE CODE PLEASE:
Program 0 (Warm-up, 40 pts): Deoxyribonucleic acid, or DNA, is comprised of four bases: (G)uanine, (C)ytosine, (A)denine and (T)hymine. Ribonucleic acid, or RNA, is different than DNA in that it contains no Thymine; thymine is replaced with something called (U)racil. For this assignment, you will create an array of 255 characters. You must start by filling the array with random characters of G, C, A and T. You must then print out the array. Next, replace all the instances of Thymine with Uracil. Finally, you must print out the array again. In your solution, you must write at least one function that contributes to the solution. You must use the length attribute of the array in your answer.
Sample run
CATGGCGTCTTGCCAAGGCGGTTCCTTGTCTTGATGATGGCTGCGAGTTCCGAGTCGCCTTTTCTATGAGTCGCGAAGTATGCGGTCAAATTATGCTTGTCCGCTGTACTAGGCCCACGGATCTCCTCAGACAGCGTCGATGTCGGAATTCGCGGGGAGGAATACTAAACATGCTGAAGTTGATACATGTACAATTGCCGCGAACCAGGTGCACAGGGTGCCCAACGATCCATGTGGAACGAGAGCGATCTAGCC
CAUGGCGUCUUGCCAAGGCGGUUCCUUGUCUUGAUGAUGGCUGCGAGUUCCGAGUCGCCUUUUCUAUGAGUCGCGAAGUAUGCGGUCAAAUUAUGCUUGUCCGCUGUACUAGGCCCACGGAUCUCCUCAGACAGCGUCGAUGUCGGAAUUCGCGGGGAGGAAUACUAAACAUGCUGAAGUUGAUACAUGUACAAUUGCCGCGAACCAGGUGCACAGGGUGCCCAACGAUCCAUGUGGAACGAGAGCGAUCUAGCC
In: Computer Science
What are the essential elements of the design side of a systems SAD?
In: Computer Science
Equivalent Units and Related Costs; Cost of Production Report; Entries
Dover Chemical Company manufactures specialty chemicals by a series of three processes, all materials being introduced in the Distilling Department. From the Distilling Department, the materials pass through the Reaction and Filling departments, emerging as finished chemicals.
The balance in the account Work in Process—Filling was as follows on January 1:
| Work in Process—Filling Department | ||
| (2,700 units, 70% completed): | ||
| Direct materials (2,700 x $18.5) | $49,950 | |
| Conversion (2,700 x 70% x $12) | 22,680 | |
| $72,630 | ||
The following costs were charged to Work in Process—Filling during January:
| Direct materials transferred from Reaction | ||
| Department: 34,800 units at $18.2 a unit | $633,360 | |
| Direct labor | 210,210 | |
| Factory overhead | 201,963 | |
During January, 34,500 units of specialty chemicals were completed. Work in Process—Filling Department on January 31 was 3,000 units, 30% completed.
Required:
1. Prepare a cost of production report for the Filling Department for January. If an amount is zero, enter "0". If required, round your cost per equivalent unit answers to two decimal places.
| Dover Chemical Company | |||
| Cost of Production Report-Filling Department | |||
| For the Month Ended January 31 | |||
| Unit Information | |||
| Units charged to production: | |||
| Inventory in process, January 1 | |||
| Received from Reaction Department | |||
| Total units accounted for by the Filling Department | |||
| Units to be assigned costs: | |||
| Equivalent Units | |||
| Whole Units | Direct Materials | Conversion | |
| Inventory in process, January 1 | |||
| Started and completed in January | |||
| Transferred to finished goods in January | |||
| Inventory in process, January 31 | |||
| Total units to be assigned costs | |||
| Cost Information | |||
| Cost per equivalent unit: | |||
| Direct Materials | Conversion | ||
| Total costs for January in Filling Department | $ | $ | |
| Total equivalent units | |||
| Cost per equivalent unit | $ | $ | |
| Costs assigned to production: | |||
| Direct Materials | Conversion | Total | |
| Inventory in process, January 1 | $ | ||
| Costs incurred in January | |||
| Total costs accounted for by the Filling Department | $ | ||
| Costs allocated to completed and partially completed units: | |||
| Inventory in process, January 1 balance | $ | ||
| To complete inventory in process, January 1 | $ | ||
| Cost of completed January 1 work in process | $ | ||
| Started and completed in January | $ | ||
| Transferred to finished goods in January | $ | ||
| Inventory in process, January 31 | |||
| Total costs assigned by the Filling Department | $ | ||
2. Journalize the entries for (1) costs transferred from Reaction to Filling and (2) the cost transferred from Filling to Finished Goods. If an amount box does not require an entry, leave it blank.
| (1) | |||
| (2) | |||
3. Determine the increase or decrease in the cost per equivalent unit from December to January for direct materials and conversion costs. If required, round your answers to two decimal places.
| Increase or Decrease | Amount | |
| Change in direct materials cost per equivalent unit | $ | |
| Change in conversion cost per equivalent unit | $ |
4. Discuss the uses of the cost of production report and the results of part (3).
The cost of production report may be used as the basis for allocating product costs between and . The report can also be used to control costs by holding each department head responsible for the units entering production and the costs incurred in the department. Any differences in unit product costs from one month to another, such as those in part (3), can be studied carefully and any significant differences investigated.
In: Accounting
Question 1: Rebel without a cause
Two drivers speed head-on toward each other and a collision is bound to occur unless one of them deviates at the last minute. If both deviate, everything is okay (they both win 1). If one deviates and the other does not, then it is a great success for the driver with iron nerves (he wins 2) and a great disgrace for the deviating driver (he loses 1). If both drivers have iron nerves, disaster strikes (both lose 2).
1. Write down the payoff matrix of this game.
2. Briefly (1-2 sentences) define the notion of Nash Equilibrium.
3. What are the Nash equilibria of this game?
In: Economics
Complete a Problem Solving discussion in Word. Your Problem Solving discussion should include Problem Statement, Problem Analysis, Program Design, Program Code and Program Test. For the Program Code section, use Raptor to code
1. Alberta Einstein teaches a business class at Podunk University. To evaluate the students in this class, she has given three tests. It is now the end of the semester and Alberta asks you to create a program that inputs each student’s test scores and outputs the average score for each student and the overall class average. (Hint: The outer loop should allow for Ms. Einstein to input all the students, one by one, and the inner loop should accept the three test scores and compute the average for each student.)
In: Computer Science
Write the balanced reaction equation for the precipitation of
calcium carbonate from
potassium carbonate and calcium chloride. Don't forget to show the
states of matter.
Using this balanced equation in the above question, determine
the limiting reactant if 25 grams of calcium chloride
reacted with 25 grams of potassium carbonate. Show your work.
In: Chemistry
Differentiate between absolute poverty and relative poverty? Is absolute poverty concept is relevant to Pakistan? Explain how absolute poverty can be eliminated from LDC?
In: Economics