0% found this document useful (0 votes)
235 views30 pages

Computer Science Textbook Solutions - 7

Uploaded by

acc-expert
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
235 views30 pages

Computer Science Textbook Solutions - 7

Uploaded by

acc-expert
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

In previous Problem 25.

17, for each solution, (a) through (e), determine which jobs are delivered
on time and which jobs are tardy.

The following data apply to sheet metal parts produced at a stamping plant that serves a final
assembly plant in the automotive industry. The data are average values representative of the parts
made at the plant. Annual demand = 150,000 pc (for each part produced); average cost per piece
= $20; holding cost = 25%, chan

See Full Question And Answer at solutionrank.com

The annual demand for a certain part is 2000 units per year. The part is produced in a batch
model manufacturing system. Annual holding cost per piece is $3.00. It takes 2 hours to set up
the machine to produce the part, and cost of system downtime is $150/hr. Determine (a) The
most economical batch quantity for this

Name five of the eight factors that influence the make-or-buy decision?

What is production planning?

What are common use items in MRP?

In the previous problem, a second proposal has been made to reduce the purging time of 3.5
hours during a changeover to less than 1.5 hours by sequencing the batches of parts so as to
reduce the differences in plastic type and color between one part and the next. In the ideal, the
same plastic can be used for all parts

See Full Question And Answer at solutionrank.com

An injection-molding machine used to produce 25 different plastic molded parts in a typical


year. Annual demand for a typical part is 20,000 units. Each part is made out of a different
plastic (the differences are in type of plastic and color). Because of the differences, changeover
time between parts is significant, a

What is an andon board?

What is a kanban? What are the two types of kanban?

Material requirements are to be planned for component C2 given the master schedule for P1 and
P2, and the product structures in. Assembly lead time for products and subassemblies (P and S
levels) is 1 week, manufacturing lead times for components (C level) is 2 weeks, and ordering
lead time for raw materials (M level)

What are carrying costs in inventory control?

See Full Question And Answer at solutionrank.com


A typical process sequence for a manufactured part consists of four types of operations. Name
and briefly describe the four types of operations.

What is capacity planning?

What is concurrent engineering?

What is a quality circle?

A work part costing $80 is processed through the factory. The manufacturing lead time for the
part is 12 weeks, and the total time spent in processing during the lead time is 30 hours for all
operations at a rate of $35 per hour. Noncooperation costs total $70 during the lead time. The
holding cost rate used by the com

See Full Question And Answer at solutionrank.com

What are the three main inputs to the MRP processor?

What is shop floor control?

The monthly demand for a part produced for an automotive final assembly plant is 16,000 units.
There are 20 working days in February and the effective operating time of the plant is 900 min
per day (two shifts). The fraction defect rate for the component is 0.017, and the automated
machine that produces the part has an

Name four of the seven decisions and details that are usually included within the scope of
process planning?

A batch of large castings is processed through a machine shop. The batch size is 20. Each raw
casting costs $175. There are 22 machining operations performed on each casting at an average
operation time of 0.5 hour per operation. Setup time per operation averages 5 hours. The cost
rate for the machine and labor is $40

See Full Question And Answer at solutionrank.com

A certain production machine has an availability of 97%. Its utilization is 92%. The fraction
defect rate of the parts made on the machine is 0.025, and it operates at only 85% of its rated
speed. What is the overall equipment effectiveness of this machine?

A certain machine tool is used to produce several components for one assembled product. To
keep in process inventories low, a batch size of 100 units is produced for each component.
Demand for the product is 3000 units per year. Production downtime costs an estimated $150/hr.
All parts produced on the machine tool are

Name five of the eleven universal design guidelines in DFM/A.


What is a just-in-time production system?

Name three of the four activities within the scope of production planning?

See Full Question And Answer at solutionrank.com

A two bin approach is used to control inventory for a certain low cost hardware item. Each bin
holds 500 units of the item. When one bin becomes empty, an order for 500 units is released to
replace the stock in that bin. The order lead time is slightly less than the time it takes to deplete
the stock in one bin. Accord

Name three benefits of a well-designed MRP system?

What is material requirements planning (MRP)?

What is virtual prototyping?

Annual demand for a part is 500 units. The part is currently produced in batches. It takes 2.0
hours to set up the production machine for this part, and the downtime during setup costs
$125/hr. Annual holding cost for the part is $5.00. The company would like to produce the part
using a new flexible manufacturing syste

See Full Question And Answer at solutionrank.com

Annual demand for a certain part is 10,000 units. At present the setup time on the machine tool
that makes this part is 5.0 hr. Cost of downtime on this machine is $200/hr. Annual holding cost
per part is $1.50. Determine (a) EOQ and (b) Total inventory costs for this data. Also, determine
(c) EOQ and (d) Total

Define lean production.

Solve previous Problem 25.15 except that the following additional information is known:
scheduled receipts of M5 are 50 units in week 3 and 50 units in week 4.

What is visual management?

Name three of the five benefits derived from computer-aided process planning?

See Full Question And Answer at solutionrank.com

Solve previous Problem 25.12 except that the current inventory on hand and on order for S3, C6,
and M6 is as follows: for S3, inventory on hand is 2 units and quantity on order is zero; for C6,
inventory on hand is 5 units and quantity on order is 10 for delivery in week 2; and for M6,
inventory on hand is 10 units and

What does autonomation mean?


Capacity adjustments can be divided into short-term adjustments and long-term adjustments.
Name four of the capacity adjustments for the short term?

What is the difference between a push system and a pull system in production control?

Name four of the seven forms of waste in production, as identified by Taiichi Ohno.

See Full Question And Answer at solutionrank.com

Given the data in the previous problem, it is desired to reduce the batch size from the value
determined in that problem to 600 pieces, consistent with the number of units produced daily by
the final assembly plant served by the stamping plant. Determine the changeover time that would
allow the economic batch size in s

What is the difference between independent demand and dependent demand?

What is the 5S system?

A part is produced in batches size of 3000 pieces. Annual demand is 60,000 pieces, and piece
cost is $5.00. Setup time to run a batch is 3.0 hr, cost of downtime on the affected equipment is
figured at $200/hr, and annual holding cost rate is 30%. What would the annual savings be if the
product were produced in the eco

It is currently day 10 in the production calendar of the XYZ Machine Shop. Three orders (A, B,
and C) are to be processed at a particular machine tool. The orders arrived in the sequence A B
C. The table below indicates the process time remaining and production calendar due date for
each order. Determine the sequence o

See Full Question And Answer at solutionrank.com

What is takt time?

Name four of the seven important applications of CAM in manufacturing planning?

A variety of assembled products are made in batches on a batch model assembly line. Every time
a different product is produced, the line must be changed over which causes lost production time.
The assembled product of interest here has an annual demand of 12,000 units. The changeover
time to set up the line for this pr

Monthly usage rate for a certain part is 15,000 units. The part is produced in batches and its
manufacturing costs are estimated to be $7.40. Holding cost is 20% of piece cost. Currently the
production equipment used to produce this part is also used to produce 19 other parts with
similar usage and cost data (assume th

What are three reasons why people and materials are sometimes moved unnecessarily in
production operations?
See Full Question And Answer at solutionrank.com

What is the basic starting point in a study to reduce setup time?

What are standardized work procedures in the Toyota production system?

Annual demand for a made to stock product is 60,000 units. Each unit costs $8.00 and the annual
holding cost rate is 24%. Setup time to change over equipment for this product is 6 hr, and the
downtime cost of the equipment is $120/hr. Determine (a) Economic order quantity and (b) Total
inventory costs.

Briefly describe the two basic approaches in computer-aided process planning.

Give some examples of engineering analysis software in common use on CAD systems.

See Full Question And Answer at solutionrank.com

What is production leveling?

Name three of the four activities often included within the scope of advanced manufacturing
planning?

Name four of the six reasons for using a CAD system to support the engineering design
function?

A supplier of parts to an assembly plant in the household appliance industry is required to make
deliveries on a just-in-time basis (daily). For one of the parts that must be delivered, the daily
requirement is 200 parts, five days per week, 52 weeks per year. However, the supplier cannot
afford to make just 200 parts

What is process planning?

See Full Question And Answer at solutionrank.com

What is enterprise resource planning (ERP)?

What is the difference between the aggregate production plan and the master production
schedule?

The weekly demand for a certain part is 950 units. The plant operates 5 days per week, with an
effective operating time of 440 min per day. Determine the takt time for this part.

What is total productive maintenance?

Describe how to incrementally maintain the results of the following operations, on both
insertions and deletions. a. Union and set difference b. Left outer join
See Full Question And Answer at solutionrank.com

Suppose that we use the tree protocol of Section 16.1.5 to manage concurrent access to a B+-
tree. Since a split may occur on an insert that affects the root, it appears that an insert operation
cannot release any locks until it has completed the entire operation. Under what circumstances is
it possible to release a loc

Give an example where the read one, write all available approach leads to an erroneous state.

(a) How much would setup time have to be reduced in order to make the batch size of 3000
pieces equal to the economic order quantity? (b) How much would total inventory costs be
reduced if the EOQ = 3000 units compared to the EOQ calculated in the previous problem? (c)
How much would total inventory costs be reduce

What are the three phases of shop floor control? Provide a brief definition of each activity.

Show that, if only left-deep join trees are considered, as in the System R optimizer, the time
taken to find themost efficient join order is around n2n.Assume that there is only one interesting
sort order.

See Full Question And Answer at solutionrank.com

Suppose that there is a database system that never fails. Is a recovery manager required for this
system?

In typical client–server systems the server machine is much more powerful than the clients;
that is, its processor is faster, it may have multiple processors, and it has more memory and disk
capacity. Consider instead a scenario where client and server machines have exactly the same
power.Would it make sense to build

Consider the relations r1 (A, B, C), r2 (C, D, E), and r3 (E, F) of Exercise. Assume that there are
no primary keys, except the entire schema. Let V (C, r1) be 900, V (C, r2) be 1100, V (E, r2) be
50, and V (E, r3) be 100. Assume that r1 has 1000 tuples, r2 has 1500 tuples, and r3 has 750
tuples. Estimate the size of r

SQL allows relations with duplicates. a. Define versions of the basic relational-algebra
operations σ, Π, ×, Π, −, ∪, and ∩ that work on relationswith duplicates, in a way
consistent with SQL. b. Check which of the equivalence rules 1 through 7.b hold for the multiset
version of the relational-algebra defin

Show that the following equivalences hold. Explain how you can apply then to improve the
efficiency of certain queries: a. E1 Θθ (E2 − E3) = (E1 Θθ E2 − E1 Θθ E3). b. σθ (AGF
(E)) = AGF (σθ (E)), where θ uses only attributes from A. c. σθ (E1 Θ E2) = σθ(E1) Θ E2
where θ uses only attributes fro
See Full Question And Answer at solutionrank.com

Explain how the following differ: fragmentation transparency, replication transparency, and
location transparency.

Under what conditions is it less expensive to avoid deadlock than to allow deadlocks to occur
and then to detect them?

Show that there are schedules that are possible under the two-phase locking protocol, but are not
possible under the timestamp protocol, and vice versa.

Consider the relations r1 (A, B, C), r2 (C, D, E), and r3 (E, F), with primary keys A, C, and E,
respectively. Assume that r1 has 1000 tuples, r2 has 1500 tuples, and r3 has 750 tuples. Estimate
the size of r1 Θ r2 Θ r3, and give an efficient strategy for computing the join.

Consider a network based on dial-up phone lines, where sites communicate periodically, such as
every night. Such networks are often configured with a server site and multiple client sites. The
client sites connect only to the server, and exchange data with other clients by storing data at the
server and retrieving data

See Full Question And Answer at solutionrank.com

The persistent messaging scheme described in this chapter depends on timestamps combined
with discarding of received messages if they are too old. Suggest an alternative scheme based on
sequence numbers instead of timestamps.

Explain the benefits of logical logging. Give examples of one situation where logical logging is
preferable to physical logging and one situation where physical logging is preferable to logical
logging.

Decorrelation: a. Write a nested query on the relation account to find for each branch with name
starting with “B”, all accounts with the maximum balance at the branch. b. Rewrite the
preceding query, without using a nested subquery; in other words, decorrelate the query. c. Give
a procedure (similar that that desc

Consider a database organized in the form of a rooted tree. Suppose that we insert a dummy
vertex between each pair of vertices. Show that, if we follow the tree protocol on the new tree,
we get better concurrency than if we follow the tree protocol on the original tree

Consider the following graph-based locking protocol, which allows only exclusive lock modes,
and which operates on data graphs that are in the form of a rooted directed acyclic graph. • A
transaction can lock any vertex first. • To lock any other vertex, the transaction must be
holding a lock on the majority of the

See Full Question And Answer at solutionrank.com


When a transaction is rolled back under timestamp ordering, it is assigned a new timestamp.
Why can it not simply keep its old timestamp?

What are the factors that can work against linear scaleup in a transaction processing system?
Which of the factors are likely to be themost important in each of the following architectures:
shared memory, shared disk, and shared nothing?

To build a highly available distributed system, you must know what kinds of failures can occur.
a. List possible types of failure in a distributed system. b. Which items in your list from part a are
also applicable to a centralized system?

Justify the following statement: Concurrent execution of transactions is more important when
data must be fetched from (slow) disk or when transactions are long, and is less important when
data is in memory and transactions are very short.

Consider an object-oriented database system based on a client-server architecture, with the server
acting as a data server. a. What is the effect of the speed of the interconnection between the client
and the server on the choice between object and page shipping? b. If page shipping is used, the
cache of data at the cl

See Full Question And Answer at solutionrank.com

Explain the purpose of the checkpoint mechanism. How often should checkpoints be performed?
How does the frequency of checkpoints affect • System performance when no failure occurs
• The time it takes to recover from a system crash • The time it takes to recover from a disk
crash

Consider the following graph-based locking protocol that allows only exclusive lock modes, and
that operates on data graphs that are in the form of a rooted directed acyclic graph. • A
transaction can lock any vertex first. • To lock any other vertex, the transaction must have
visited all the parents of that vertex

Explain the notions of transparency and autonomy. Why are these notions desirable from a
human-factors standpoint?

For each of the following protocols, describe aspects of practical applications that would lead
you to suggest using the protocol, and aspects that would suggest not using the protocol: •
Two-phase locking • Two-phase locking with multiple-granularity locking • The tree
protocol • Timestamp ordering • Validat

Explain the difference between a system crash and a “disaster.”

See Full Question And Answer at solutionrank.com


Most implementations of database systems use strict two-phase locking. Suggest three reasons
for the popularity of this protocol.

Show how to derive the following equivalences by a sequence of transformations using the
equivalence rules in Section 14.3.1. a. σθ1 ∧ θ2 ∧ θ3 (E) = σθ1 (σθ2 (σθ3 (E))) b. σθ1
∧ θ2(E1 1θ3 E2) = σθ1 (E1 1θ3 (σθ2 (E2))), where θ2 involves only attributes from E2

Consider the following two transactions: T31: read (A); read (B); If A = 0 then B: = B + 1; write
(B). T32: read (B); read (A); If B = 0 then A: = A + 1; write (A). Add lock and unlock
instructions to transactions T31 and T32, so that they observe the two-phase locking protocol.
Can the execution of these transactions

Explain how the buffer manager may cause the database to become inconsistent if some log
records pertaining to a block are not output to stable storage before the block is output to disk.

Give an example of an expression defining a materialized view and two situations (sets of
statistics for the input relations and the differentials) such that incremental view maintenance is
better than recomputation in one situation and recomputation is better in the other situation.

See Full Question And Answer at solutionrank.com

Given that the LDAP functionality can be implemented on top of a database system, what is the
need for the LDAP standard?

If we apply a distributed version of the multiple-granularity protocol of Chapter to a distributed


database, the site responsible for the root of the DAG may become a bottleneck. Suppose we
modify that protocol as follows: • Only intention-mode locks are allowed on the root. • All
transactions are given all possibl

Consider a database consisting of 10 consecutive disk blocks (block 1, block 2, . . ., block 10).
Show the buffer state and a possible physical ordering of the blocks after the following updates,
assuming that shadow paging is used, that the buffer in main memory can hold only three blocks,
and that a least recently us

A set of equivalence rules is said to be complete if, whenever two expressions are equivalent,
one can be derived from the other by a sequence of uses of the equivalence rules. Is the set of
equivalence rules that we considered in Section 14.3.1 complete?

Stable storage cannot be implemented. a. Explain why it cannot be. b. Explain how database
systems deal with this problem.

See Full Question And Answer at solutionrank.com

When is it useful to have replication or fragmentation of data? Explain your answer.


How might a distributed database designed for a local-area network differ from one designed for
a wide-area network?

Compare the deferred- and immediate-modification versions of the log-based recovery scheme in
terms of ease of implementation and overhead cost.

What is a cascade less schedule? Why is cascadelessness of schedules desirable? Are there any
circumstances under which it would be desirable to allow non-cascadeless schedules? Explain
your answer.

Discuss the advantages and disadvantages of the two methods that we presented in Section
19.5.2 for generating globally unique timestamps.

See Full Question And Answer at solutionrank.com

For each of the following pairs of expressions, give instances of relations that show the
expressions are not equivalent. a. ΠA(R − S) and ΠA (R) – ΠA (S) b. σB < 4(AGmax(B)(R))
and AGmax(B)(σB<4(R)) c. In the preceding expressions, if both occurrences of max were
replaced by min would the expressions be e

Although SIX mode is useful in multiple-granularity locking, an exclusive and intend-shared


(XIS) mode is of no use. Why is it useless?

Consider the relations employee (name, address, salary plant-number) machine (machine-
number, type plant-number) Assume that the employee relation is fragmented horizontally by
plant-number, and that each fragment is stored locally at its corresponding plant site. Assume
that the machine relation is stored in its entir

List the ACID properties. Explain the usefulness of each.

Compute r x s for the relations as shown below.

See Full Question And Answer at solutionrank.com

Since every conflict-serializable schedule is view serializable, why do we emphasize conflict


serializability rather than view serializability?

Explain the reasons why recovery of interactive transactions is more difficult to deal with than is
recovery of batch transactions. Is there a simple way to deal with this difficulty?

Devise a timestamp-based protocol that avoids the phantom phenomenon.

If deadlock is avoided by deadlock avoidance schemes, is starvation still possible? Explain your
answer.
Consider a relation that is fragmented horizontally by plant-number: Employee (name, address,
salary plant-number) assumes that each fragment has two replicas: one stored at the New York
site and one stored locally at the plant site. Describe a good processing strategy for the following
queries entered at the San Jose

See Full Question And Answer at solutionrank.com

Explain the phantom phenomenon. Why may this phenomenon lead to an incorrect concurrent
execution despite the use of the two-phase locking protocol?

Assume that immediate modification is used in a system. Show, by an example, how an


inconsistent database state could result if log records for a transaction are not output to stable
storage prior to data updated by the transaction being written to disk.

For each of the strategies of Exercise 19.18, state how your choice of a strategy depends on: a.
The site at which the querywas entered b. The site at which the result is desired

What benefit does rigorous two-phase locking provide? How does it compare with other forms of
two-phase locking?

Suppose you were in charge of the database operations of a company whose main job is to
process transactions. Suppose the company is growing rapidly each year, and has outgrown its
current computer system. When you are choosing a new parallel computer, what measure is most
relevant—speedup, batch scaleup, or transact

See Full Question And Answer at solutionrank.com

Consider the following two transactions: T1: read (A); read (B); if A = 0then B: = B + 1; write
(B). T2: read (B); read (A); if B = 0 then A: = A + 1; write (A). Let the consistency requirement
be A = 0 ∨ B = 0, with A = B = 0 the initial values. a. Show that every serial execution
involving these two transaction

What benefit does strict two-phase locking provide? What disadvantages result?

Explain the difference between data replication in a distributed system and the maintenance of a
remote backup site.

For each of the following requirements, identify the best choice of degree of durability in a
remote backup system: a. Data loss must be avoided but some loss of availability may be
tolerated. b. Transaction commit must be accomplished quickly, even at the cost of loss of some
committed transactions in a disaster. c. A

Instead of storing shared structures in shared memory, an alternative architecture would be to


store them in the local memory of a special process, and access the shared data by interprocess
communication with the process. What would be the drawback of such architecture?
See Full Question And Answer at solutionrank.com

What is lock de-escalation, and under what conditions is it required why is it not required if the
unit of data shipping is an item?

Consider the following deadlock-detection algorithm. When transaction Ti, at site S1, requests a
resource from Tj, at site S3, a request message with timestamp n is sent. The edge (Ti, Tj, n) is
inserted in the local wait-for of S1. The edge (Ti, Tj, n) is inserted in the local wait-for graph of
S3 only if Tj has recei

Consider a file system such as the one on your favorite operating system. a. What are the steps
involved in creation and deletion of files, and in writing data to a file? b. Explain how the issues
of atomicity and durability are relevant to the creation and deletion of files, and to writing data to
files.

Suppose a transaction is written in C with embedded SQL, and about 80 percent of the time is
spent in the SQL code, with the remaining 20 percent spent in C code. How much speedup can
one hope to attain if parallelism is used only for the SQL code? Explain.

Under a modified version of the timestamp protocol, we require that a commit bit be tested to see
whether a read request must wait. Explain how the commit bit can prevent cascading abort. Why
is this test not necessary for write requests?

See Full Question And Answer at solutionrank.com

Consider a variant of the tree protocol called the forest protocol. The database is organized as a
forest of rooted trees. Each transaction Ti must follow the following rules: • The first lock in
each tree may be on any data item. • The second, and all subsequent, locks in a tree may be
requested only if the parent

Locking is not done explicitly in persistent programming languages. Rather, objects (or the
corresponding pages) must be locked when the objects are accessed. Most modern operating
systems allow the user to set access protections (no access, read, writes) on pages, and memory
access that violate the access protections

What is a recoverable schedule? Why is recoverability of schedules desirable? Are there any
circumstances under which it would be desirable to allow nonrecoverable schedules? Explain
your answer.

Transaction server architectures are popular for client-server relational databases, where
transactions are short. On the other hand, data server architectures are popular for client-server
object-oriented database systems, where transactions are expected to be relatively long. Give two
reasons why data servers may be
Consider a failure that occurs during 2PC for a transaction. For each possible failure that you
listed in Exercise 19.6a, explain how 2PC ensures transaction atomicity despite the failure.

See Full Question And Answer at solutionrank.com

Consider the precedence graph of Figure is the corresponding schedule conflict serializable?
Explain your answer.

Sometimes a transaction has to be undone after it has commited, because it was erroneously
executed, for example because of erroneous input by a bank teller. a. Give an example to show
that using the normal transaction undo mechanism to undo such a transaction could lead to an
inconsistent state. b. One way to handle t

Give an example where lazy replication can lead to an inconsistent database state even when
updates get an exclusive lock on the primary (master) copy.

When the system recovers from a crash, it constructs an undo-list and a redo-list. Explainwhy log
records for transactions on the undolist must be processed in reverse order, while those log
records for transactions on the redo-list are processed in a forward direction.

Suppose that a B+-tree index on (branch-name, branch-city) is available on relation branch.


What would be the best way to handle the following selection? σ (branch-
city<“Brooklyn”) ∧ (assets<5000)∧(branch-name=“Downtown”)(branch)

See Full Question And Answer at solutionrank.com

Consider the validation-based concurrency-control scheme of Section 16.3. Show that by


choosing Validation (Ti), rather than Start (Ti), as the timestamp of transaction Ti, we can expect
better response time provided that conflict rates among transactions are indeed low.

Describe how LDAP can be used to provide multiple hierarchical views of data, without
replicating the base level data.

Database-system implementers have paid much more attention to the ACID properties than have
file-system implementers. Why might this be the case?

Explain the difference between the three storage types—volatile, nonvolatile, and stable—in
terms of I/O cost.

Discuss the relative advantages of centralized and distributed databases.

See Full Question And Answer at solutionrank.com

Compare the shadow-paging recovery scheme with the log-based recovery schemes in terms of
ease of implementation and overhead cost.
Consider a bank that has a collection of sites, each running a database system. Suppose the only
way the databases interact is by electronic transfer of money between one another. Would such a
system qualify as a distributed database why?

Suppose that a B+-tree index on branch-city is available on relation branch, and that no other
index is available. What would be the best way to handle the following selections that involve
negation? a. σ ¬ (branch-city<“Brooklyn”)(branch) b. σ ¬ (branch-
city=“Brooklyn”)(branch) c. σ ¬ (branch-city<“

Show by example that there are schedules possible under the tree protocol that is not possible
under the two-phase locking protocol, and vice versa.

In multiple-granularity locking, what is the difference between implicit and explicit locking?

See Full Question And Answer at solutionrank.com

Logging of updates is not done explicitly in persistent programming languages. Describe how
page access protections provided by modern operating systems can be used to create before and
after images of pages that are updated.

Show that, with n relations, there are (2(n − 1))! / (n−1)! Different join orders. If you wish,
you can derive the formula for the number of complete binary trees with n nodes from the
formula for the number of binary trees with n nodes. The number of binary trees with n nodes is
1/n+1 (2n n); this number is known

Explain the distinction between the terms serial schedule and serializable schedule.

Use of multiple-granularity locking may require more or fewer locks than an equivalent system
with a single lock granularity. Provide examples of both situations, and compare the relative
amount of concurrency allowed.

Show that the lowest-cost join order can be computed in time O(3n). Assume that you can store
and look up information about a set of relations (such as the optimal join order for the set, and
the cost of that join order) in constant time. (If you find this exercise difficult, at least show the
looser time bound of O(22

See Full Question And Answer at solutionrank.com

For each of the three partitioning techniques, namely round-robin, hash partitioning, and range
partitioning, give an example of a query for which that partitioning technique would provide the
fastest response.

Why is it relatively easy to port a database from a single processor machine to a multiprocessor
machine if individual queries need not be parallelized?
What is the difference between powered lead through and manual lead through in robot
programming?

Write the APT geometry statements to define the part geometry.

Write the part program to drill the holes in the part shown in Figure P7.26. The part is 12.0 mm
thick. Cutting speed = 100 m/min and feed = 0.06 mm/rev. Use the lower left corner of the part
as the origin in the x-y axis system. Write the part program in the word address format using
absolute positioning. The program

See Full Question And Answer at solutionrank.com

In Problem 7.3, the axis corresponding to the feed rate uses a dc servomotor as the drive unit and
an optical encoder as the feedback sensing device. The motor is geared to the lead screw with a
10:1 reduction (10 turns of the motor for each turn of the lead screw). If the lead screw pitch = 5
mm, and the optical encod

In timestamp ordering, W-timestamp (Q) denotes the largest timestamp of any transaction that
executed write (Q) successfully. Suppose that, instead, we defined it to be the timestamp of the
most recent transaction to execute write (Q) successfully.Would this change in wording make
any difference? Explain your answer.

A lead screw coupled directly to a dc servomotor is used to drive one of the table axes of an NC
milling machine. The lead screw has 2.5 threads/cm. The optical encoder attached to the lead
screw emits 100 pulses/rev of the lead screw. The motor rotates at a maximum speed of 800
rev/min. Determine:

A component insertion machine takes 2.0 sec to put a component into a printed circuit (PC)
board, once the board has been positioned under the insertion head. The x y table that positions
the PC board uses a stepper motor directly linked to a lead screw for each axis. The lead screw
has a pitch = 5.0 mm. The motor step

What is a machining center?

See Full Question And Answer at solutionrank.com

Write the APT geometry statements to define the outline of the part. Use the lower left corner of
the part as the origin in the x-y axis system.

What is numerical control?

The part is to be drilled on a turret-type drill press. The part is 15.0 mm thick. There are three
drill sizes to be used: 8 mm, 10 mm, and 12 mm. These drills are to be specified in the part
program by tool turret positions T01, T02, and T03. All tooling is high speed steel. Cutting speed
= 75 mm/min and feed = 0.08 m
A double-acting hydraulic cylinder is used to actuate a linear joint of an industrial robot. The
inside diameter of the cylinder is 3.5 in. The piston rod has a diameter of 0.5 in. The hydraulic
power source can generate up to 500 lb/in2 of pressure at a flow rate of 1200 in3/min to drive the
piston. (a) Determine the

With reference to precision in an NC positioning system, what is control resolution?

See Full Question And Answer at solutionrank.com

A machinable grade of aluminum is to be milled on an NC machine with a 20 mm diameter four-


tooth end milling cutter. Cutting speed = 120 m/min and feed = 0.008 mm/tooth. Convert these
values to rev/min and mm/rev, respectively.

A stepping motor with 200 step angles is coupled to a lead screw through a gear reduction of 5:1
(5 rotations of the motor for each rotation of the lead screw). The lead screw has 2.4 threads/cm.
The worktable driven by the lead screw must move a distance = 25.0 cm at a feed rate = 75
cm/min. Determine (a) The number

A tool-chip thermocouple is used to measure the cutting temperature in a turning operation. The
two dissimilar metals in a tool-chip thermocouple are the tool material and the work piece metal.
During the turning operation, the chip from the work metal forms a junction with the rake face of
the tool to create the therm

The outline of the cam in Figure P7.38 is to be machined in an end milling operation, using a
12.5 mm diameter end mill with two teeth. The part is 7.5 mm thick. Write the complete APT
program for this job, using a feed rate = 80 mm/min and a spindle speed = 500 rev/min.
Postprocessor call statement is MACHIN/MILL, 03.

What are the three categories of robot industrial applications, as identified in the text?

See Full Question And Answer at solutionrank.com

What is the transfer function of a sensor?

What are the two important disadvantages of DC electric motors that make the AC motor
relatively attractive?

Although NC technology is most closely associated with machine tool applications, it has been
applied to other processes also. Name three of the six examples listed in the text.

The worktable of an NC machine is driven by a closed-loop positioning system which consists of


a servomotor, Leadscrew, and optical encoder. The lead screw pitch = 4 mm and is coupled
directly to the motor shaft (gear ratio = 1:1). The optical encoder generates 225 pulses per
Leadscrew revolution. The table has been pr
What is distributed numerical control (DNC)?

See Full Question And Answer at solutionrank.com

The top surface of a large cast iron plate is to be face-milled. The area to be machined is 400 mm
wide and 700 mm long. The insert-type face-milling cutter has eight teeth and is 100 mm in
diameter. Define the origin of the axis system at the lower left corner of the part with the long
side parallel to the x-axis. Wri

Write the APT part program to perform the drilling operations for the part. Use the TURRET
command to call the different drills required. Cutting speed = 0.4 m/s, feed = 0.10 mm/rev., and
table travel speed between holes = 500 mm/min. Postprocessor call statement is
MACHIN/TURDRL, 02.

The two axes of an x y positioning table are each driven by a stepping motor connected to a
Leadscrew with a 4:1 gear reduction. The number of step angles on each stepping motor is 200.
Each Leadscrew has a pitch = 5.0 mm and provides an axis range = 400.0 mm. There are 16 bits
in each binary register used by the contr

A voltage of 24 V is applied to a DC servomotor whose torque constant = 0.115 N-m/A and


voltage constant = 0.097 V/(rad/sec). Armature resistance = 1.9 ohms. The motor is directly
coupled to a blower shaft for an industrial process. (a) What is the stall torque of the motor? (b)
Determine the operating point of the m

Write the complete APT part program to profile mill the outside edges of the part. The part is 15
mm thick. Tooling = 30 mm diameter end mill with four teeth, cutting speed = 150 mm/min, and
feed = 0.085 mm/tooth. Use the lower left corner of the part as the origin in the x-y axis system.
Two of the holes in the part h

See Full Question And Answer at solutionrank.com

Write the APT geometry statements to define the hole positions of the part. Use the lower left
corner of the part as the origin in the x-y axis system.

A single-acting hydraulic cylinder with spring return has an inside diameter of 88 mm. Its
application is to push pallets off of a conveyor into a storage area. The hydraulic power source
can generate up to 3.2 MPa of pressure at a flow rate of 175,000 mm3/sec to drive the piston.
Determine (a) The maximum possible ve

Write the APT geometry statements to define the part geometry. Use the lower left corner of the
part as the origin in the x-y axis system.

What is a palletizing operation?


A dc servomotor is used to drive one of the table axes of an NC milling machine. The motor is
coupled directly to the lead screw for the axis, and the lead screw pitch = 5 mm. The optical
encoder attached to the lead screw emits 500 pulses per revolution of the lead screw. The motor
rotates at a normal speed of 300 rev

See Full Question And Answer at solutionrank.com

Briefly describe the differences between the two basic types of positioning control systems used
in NC?

How is the operation of a stepper motor different from the operation of conventional DC or AC
motors?

Solve the previous problem assuming the optical encoder is directly coupled to the motor shaft
rather than to the lead screw. Previous problem A NC machine tool table is powered by a
servomotor, lead screw, and optical encoder. The lead screw has a pitch = 5.0 mm and is
connected to the motor shaft with a gear ratio

An end milling operation is performed on an NC machining center. The total length of travel is
625 mm along a straight line path to cut a particular work piece. Cutting speed = 2.0 m/s and
chip load (feed/tooth) = 0.075 mm. The end milling cutter has two teeth and its diameter = 15.0
mm. Determine the feed rate and tim

Name four of the six part characteristics that are most suited to the application of numerical
control listed in the text.

See Full Question And Answer at solutionrank.com

Briefly describe the three phases of the analog-to-digital conversion process?

What are the three basic components of an NC system?

A numerical control drill press drills four 10.0 mm diameter holes at four locations on a flat
aluminum plate in a production work cycle. Although the plate is only 12 mm thick, the drill
must travel a full 20 mm vertically at each whole location to allow for clearance above the plate
and breakthrough of the drill on t

What are three disadvantages of implementing NC technology?

What is the difference between an active sensor and a passive sensor?

See Full Question And Answer at solutionrank.com

A DAC uses a reference voltage of 80 V and has 6-bit precision. In four successive sampling
periods, each 1 second long, the binary data contained in the output register were 100000,
011111, 011101, and 011010. Determine the equation for the voltage as a function of time
between sampling instants 3 and 4 using (a) A z

The outline of the part in the previous problem is to be profile milled using a 30 mm diameter
end mill with four teeth. The part is 15 mm thick. Cutting speed = 150 mm/min and feed = 0.085
mm/tooth. Use the lower left corner of the part as the origin in the x-y axis system. Two of the
holes in the part have already be

The positioning table for a component insertion machine uses a stepping motor and lead screw
mechanism. The design specifications require a table speed of 0.4 m/s and an accuracy = 0.02
mm. The pitch of the lead screw = 5.0 mm, and the gear ratio = 2:1 (2 turns of the motor for each
turn of the lead screw). The mechani

What is post processing in computer-assisted part programming?

What is the difference between manual part programming and computer-assisted part
programming?

See Full Question And Answer at solutionrank.com

A digital tachometer is used to determine the surface speed of a rotating work piece in surface
ft/min. Tachometers are designed to read rotational speed in rev/min, but in this case the shaft of
the tachometer is directly coupled to a wheel whose outside rim is made of rubber. When the
wheel rim is pressed against the

The part is to be milled, using a 20 mm diameter end mill with four teeth. Write the APT
geometry and motion statements for this job. Assume that preliminary passes have been
completed so that only the final pass ("to size") is to be completed in this program. Cutting speed
= 500 rev./min, and feed rate = 250 mm/min. T

A cast iron work piece is to be face milled on an NC machine using cemented carbide inserts.
The cutter has 16 teeth and is 120 mm in diameter. Cutting speed = 200 m/min and feed = 0.005
mm/tooth. Convert these values to rev/min and mm/rev, respectively.

Write the APT geometry statements to define the outline of the cam.

What are some of the advantages of CAD/CAM-based NC part programming compared to


computer-assisted part programming?

See Full Question And Answer at solutionrank.com

What is an actuator?

What is an optical encoder, and how does it work?


What are four advantages of numerical control when properly applied in machine tool
operations?

What is linear interpolation, and why is it important in NC?

A NC machine tool table is powered by a servomotor, lead screw, and optical encoder. The lead
screw has a pitch = 5.0 mm and is connected to the motor shaft with a gear ratio of 16:1 (16 turns
of the motor for each turn of the lead screw). The optical encoder is connected directly to the
lead screw and generates 200 pu

See Full Question And Answer at solutionrank.com

A stepper motor has a step angle = 7.5(. (a) How many pulses are required for the motor to rotate
through five complete revolutions? (b) What pulse frequency is required for the motor to rotate
at a speed of 200 rev/min?

What is a solenoid?

A milling operation is performed on a NC machining center. Total travel distance = 300 mm in a


direction parallel to one of the axes of the worktable. Cutting speed = 1.25 m/s and chip load =
0.05 mm. The end milling cutter has four teeth and its diameter = 20.0 mm. The axis uses a dc
servomotor whose output shaft is c

A continuous voltage signal is to be converted into its digital counterpart using an analog-to-
digital converter. The maximum voltage range is (30 V. The ADC has a 12-bit capacity.
Determine (a) Number of quantization levels,

What is the right-hand rule in NC and where is it used?

See Full Question And Answer at solutionrank.com

Briefly describe the two steps in the digital-to-analog conversion process?

A double-acting hydraulic cylinder has an inside diameter = 75 mm. The piston rod has a
diameter = 14 mm. The hydraulic power source can generate up to 5.0 MPa of pressure at a flow
rate of 200,000 mm3/sec to drive the piston. (a) What are the maximum possible velocity of the
piston and the maximum force that can be a

Two stepping motors are used in an open loop system to drive the lead screws for x y
positioning. The range of each axis is 250 mm. The shafts of the motors are connected directly to
the lead screws. The pitch of each lead screw is 3.0 mm, and the number of step angles on the
stepping motor is 125. (a) How closely can

What is control resolution in a robot positioning system?


Nearly all actuators can be classified into one of three categories, according to type of drive
power. Name the three categories.

See Full Question And Answer at solutionrank.com

A digital-to-analog converter uses a reference voltage of 120 V dc and has eight binary digit
precision. In one of the sampling instants, the data contained in the binary register = 01010101.
If a zero-order hold is used to generate the output signal, determine the voltage level of that
signal.

Write the complete APT part program to perform the drilling operations for the part drawing in
Figure P7.26. Cutting speed = 0.4 m/s, feed = 0.10 mm/rev., and table travel speed between holes
= 500 mm/min. Postprocessor call statement is MACHIN/DRILL, 04.

The worktable in an NC positioning system is driven by a lead screw with a 4 mm pitch. The
lead screw is powered by a stepping motor which has 250 step angles. The worktable is
programmed to move a distance of 100 mm from its present position at a travel speed of 300
mm/min. (a) How many pulses are required to move th

In a DC motor, what is a commutator?

A voltage signal with a range of zero to 115 V. is to be converted by means of an ADC.


Determine the minimum number of bits required to obtain a quantization error of (a) (5 V
maximum, (b) (1 V maximum, (c) (0.1 V maximum.

See Full Question And Answer at solutionrank.com

In the previous problem, what is the power delivered by the motor at the operating point in units
of (a) Watts and (b) Horsepower? Previous problem A DC servomotor has a torque constant =
0.088 N-m/A and a voltage constant = 0.12 V/(rad/sec). The armature resistance is 2.3 ohms. A
terminal voltage of 30 V is used t

A DC servomotor has a torque constant = 0.088 N-m/A and a voltage constant = 0.12
V/(rad/sec). The armature resistance is 2.3 ohms. A terminal voltage of 30 V is used to operate
the motor. Determine (a) The starting torque generated by the motor just as the voltage is
applied, (b) The maximum speed at a torque of zer

Write the APT geometry statements to define the hole positions of the part. Use the lower left
corner of the part as the origin in the x-y axis system.

A digital flow meter operates by emitting a pulse for each unit volume of fluid flowing through
it. The particular flow meter of interest here has a unit volume of 57.9 cm3 per pulse. In a certain
process control application, the flow meter emitted 6489 pulses during a period of 3.6 min.
Determine (a) The total volume
What is the resolution of an analog-to-digital converter?

See Full Question And Answer at solutionrank.com

What is an industrial robot?

Write the complete APT part program to perform the profile milling operation for the part
drawing in Figure P7.29. Tooling = 20 mm diameter end mill with two teeth, cutting speed = 125
mm/min, and feed = 0.10 mm/tooth. The part is 10 mm thick. Use the lower left corner of the
part as the origin in the x-y axis system.

What is the difference between point-to-point and continuous path control in a motion control
system?

The outline of the part in Figure P7.29 is to be profile milled, using a 20 mm diameter end mill
with two teeth. The part is 10 mm thick. Cutting speed = 125 mm/min and feed = 0.10 mm/tooth.
Use the lower left corner of the part as the origin in the x-y axis system. The two holes in the part
have already been drilled a

Name five of the ten features and capabilities of a modern CNC machine control unit listed in the
text.

See Full Question And Answer at solutionrank.com

A DC servomotor is used to actuate one of the axes of an x-y positioned. The motor has a torque
constant of 8.75 in-lb/A and a voltage constant of 10 V/(1000 rev/min). The armature resistance
is 2.0 ohms. At a given moment, the positioned table is not moving and a voltage of 20 V is
applied to the motor terminals. Dete

The shaft of a stepper motor is directly connected to a lead screw that drives a worktable in an x-
y positioning system. The motor has a step angle = 5(. The pitch of the lead screw is 6 mm,
which means that the worktable moves in the direction of the lead screw axis by a distance of 6
mm for each complete revolution o

In the previous problem, suppose that a second order hold were to be used to generate the output
signal. The equation for the second-order hold is the following: E(t) = E0 + (t + (t2 , where E0 =
starting voltage at the beginning of the time interval. (a) For the binary data given in the previous
problem, determine the

What is the difference between absolute positioning and incremental positioning?

During calibration, an Iron/Constantan thermocouple is zeroed (set to emit a zero voltage) at 0(C.
At 750(C, it emits a voltage of 38.8 mV. A linear output/input relationship exists between 0(C
and 750(C. Determine (a) The transfer function of the thermocouple and (b) The temperature
corresponding to a voltage outpu
See Full Question And Answer at solutionrank.com

A two-axis NC system used to control a machine tool table uses a bit storage capacity of 16 bits
in its control memory for each axis. The range of the x-axis is 600 mm and the range of the y-
axis is 500 mm. The mechanical accuracy of the machine table can be represented by a Normal
distribution with standard deviation

The part outline is to be profile milled in several passes from a rectangular slab (outline of slab
shown in dashed lines), using a 25 mm diameter end mill with four teeth. The initial passes are to
remove no more than 5 mm of material from the periphery of the part, and the final pass should
remove no more than 2 mm t

What is the difference between a contact input interface and a contact output interface?

One axis of an NC positioning system is driven by a stepping motor. The motor is connected to a
lead screw whose pitch is 4.0 mm, and the lead screw drives the table. Control resolution for the
table is specified as 0.015 mm. Determine (a) The number of step angles required to achieve the
specified control resolution,

The step angle of a certain stepper motor = 1.8(. The application of interest is to rotate the motor
shaft through 10 complete revolutions at an angular velocity of 20 rad/sec. Determine (a) The
required number of pulses and (b) The pulse frequency to achieve the specified rotation.

See Full Question And Answer at solutionrank.com

A turning operation is to be performed on an NC lathe. Cutting speed = 2.5 m/s, feed = 0.2
mm/rev, and depth = 4.0 mm. Work piece diameter = 100 mm and its length = 400 mm.
Determine (a) Rotational speed of the work bar, (b) Feed rate, (c) Metal removal rate, and (d)
Time to travel from one end of the part to the o

A dc servomotor drives the x-axis of a NC milling machine table. The motor is coupled directly
to the table lead screw, whose pitch = 6.25 mm. An optical encoder is connected to the lead
screw. The optical encoder emits 125 pulses per revolution. To execute a certain programmed
instruction, the table must move from poi

Stepping motors are used to drive the two axes of an insertion machine used for electronic
assembly. A printed circuit board is mounted on the table which must be positioned accurately
for reliable insertion of components into the board. Range of each axis = 700 mm. The lead
screw used to drive each of the two axes has

The two axes of an x y positioning table are each driven by a stepping motor connected to a lead
screw with a 10:1 gear reduction. The number of step angles on each stepping motor is 20. Each
lead screw has a pitch = 4.5 mm and provides an axis range = 300 mm. There are 16 bits in each
binary register used by the contr
What are four of the six general characteristics of industrial work situations that tend to promote
the substitution of robots for human workers?

See Full Question And Answer at solutionrank.com

What is the difference between an analog sensor and a discrete sensor?

Prove Theorem 10.8. If Σki =1 αi < 1, then the solution to the equation T(N) = Σki =1 T(αi N)
+ O(N) is T(N) = O(N).

N points are placed in a unit square. Show that the distance between the closest pair is
O(N−1/2).

Show the result of α-β pruning of the tree in Figure 10.76.

Referring back to Problem 7.8, the mechanical inaccuracies in the open loop positioning system
can be described by a normal distribution whose standard deviation = 0.005 mm. The range of
the worktable axis is 500 mm, and there are 12 bits in the binary register used by the digital
controller to store the programmed pos

See Full Question And Answer at solutionrank.com

Solve the previous problem only the servomotor is connected to the lead screw through a gear
box whose reduction ratio = 10:1 (10 revolutions of the motor for each revolution of the lead
screw). Previous problem A lead screw coupled directly to a dc servomotor is used to drive one
of the table axes of an NC milling

Consider the problem of placing eight queens on an (eight-by-eight) chess board. Two queens
are said to attack each other if they are on the same row, column, or (not necessarily main)
diagonal. a. Give a randomized algorithm to place eight nonattacking queens on the board. b.
Give a backtracking algorithm to solve t

Suppose that the edges in an undirected graph G satisfy the triangle inequality: cu,v + cv,w ≥
cu,w. Show how to compute a traveling salesman tour of cost at most twice optimal.

a. Give an example where Dijkstra's algorithm gives the wrong answer in the presence of a
negative edge but no negative-cost cycle. b. Show that the weighted shortest-path algorithm
suggested in Section 9.3.3 works if there are negative-weight edges, but no negative-cost cycles,
and that the running time of this algor

Show that the amortized bound of O(logN) for the skew heap operations described in the text
cannot be converted to a worst-case bound, by giving a sequence of operations that lead to a
merge requiring Θ(N) time.

See Full Question And Answer at solutionrank.com


By changing the potential function, it is possible to prove different bounds for splaying. Let the
weight function W(i) be some function assigned to each node in the tree, and let S(i) be the sum
of the weights of all the nodes in the subtree rooted at i, including i itself. The special case W(i)
= 1 for all nodes corr

The one-dimensional circle packing problem is as follows: You have N circles of radii r1,
r2, . . . , rN. These circles are packed in a box such that each circle is tangent to the bottom of the
box and are arranged in the original order. The problem is to find the width of the minimum-
sized box. Figure 10.77 shows an e

Suppose that the maze may or may not have a solution. a. Describe a linear-time algorithm that
determines the minimum number of walls that need to be knocked down to create a solution. b.
Describe an algorithm (not necessarily linear-time) that finds a shortest path after knocking down
the minimum number of walls. No

Figure 10.75 shows a routine to flip a coin, assuming that random returns an integer (which is
prevalent in many systems). What is the expected performance of the skip list algorithms if the
random number generator uses a modulus of the form M = 2B (which is unfortunately prevalent
on many systems)?

Othello played on a 6-by-6 board is a forced win for black. Prove this by writing a program.
What is the final score if play on both sides is optimal?

See Full Question And Answer at solutionrank.com

Modify the splay tree to support queries for the kth smallest item.

Complete the analysis of the sampling algorithm described at the end of Section 10.2.3, and
explain how the values of δ and s are chosen.

Assume that the Hamiltonian cycle problem is NP-complete for undirected graphs. a. Prove that
the Hamiltonian cycle problem is NP-complete for directed graphs. b. Prove that the unweighted
simple longest-path problem is NP-complete for directed graphs.

A convex polygon is a polygon with the property that any line segment whose endpoints are on
the polygon lies entirely within the polygon. The convex hull problem consists of finding the
smallest (area) convex polygon that encloses a set of points in the plane. Figure 10.79 shows the
convex hull for a set of 40 points.

Show that if the symbols are sorted by frequency, Huffman's algorithm can be implemented in
linear time.

See Full Question And Answer at solutionrank.com


a. Find the shortest path from A to all other vertices for the graph in Figure 9.82. b. Find the
shortest unweighted path from B to all other vertices for the graph in Figure 9.82.

Extend skew heaps to support the decreaseKey operation in O(logN) amortized time.

You are given a currency system with coins of (decreasing) value c1, c2, . . . , cN cents. a. Give
an algorithm that computes the minimum number of coins required to give K cents in change. b.
Give an algorithm that computes the number of different ways to give K cents in change.

The object of the Kevin Bacon Game is to link a movie actor to Kevin Bacon via shared movie
roles. The minimum number of links is an actor's Bacon number. For instance, Tom Hanks has a
Bacon number of 1; he was in Apollo 13 with Kevin Bacon. Sally Field has a Bacon number of
2, because she was in Forrest Gump with Tom

a. Show how to implement the merge operation on splay trees so that any sequence of N−1
merges starting from N single-element trees takes O(N log2 N) time. b. Improve the bound to
O(N logN).

See Full Question And Answer at solutionrank.com

Suppose that in an attempt to save time, we splay on every second tree operation. Does the
amortized cost remain logarithmic?

A student needs to take a certain number of courses to graduate, and these courses have
prerequisites that must be followed. Assume that all courses are offered every semester and that
the student can take an unlimited number of courses. Given a list of courses and their
prerequisites, compute a schedule that requires

Once the suffix array is constructed, the short routine shown in Figure 12.50 can be invoked
from Figure 12.32 to create the longest common prefix array. a. In the code, what does rank[i]
represent? b. Suppose that LCP[rank[i] ] = h. Show that LCP[rank[i+1] ] ≥ h − 1. c. Show
that the algorithm in Figure 12.50 c

Show that the amortized time of a zig-zig splay is at most 3(Rf (X) − Ri(X)).

What is the worst-case running time of Dijkstra's algorithm when implemented with d-heaps
(Section 6.5)?

See Full Question And Answer at solutionrank.com

Write a program to compute word ladders where single-character substitutions have a cost of 1,
and single-character additions or deletions have a cost of p > 0, specified by the user. As
mentioned at the end of Section 9.3.6, this is essentially a weighted shortest-path problem.
Prove Theorem 10.7. The solution to the equation T(N) = aT(N/b) + Θ(Nk logp N), where a ≥
1, b > 1, and p ≥ 0 is

Show the operation of all the bin-packing strategies discussed in Section 10.1.3 on the input
0.42, 0.25, 0.27, 0.07, 0.72, 0.86, 0.09, 0.44, 0.50, 0.68, 0.73, 0.31, 0.78, 0.17, 0.79, 0.37, 0.73,
0.23, 0.30.

Extend the reconstruction algorithm to find all homometric point sets given a distance set.

What is the asymptotic running time of quickselect, using a median-of-medianof- three


partitioning strategy?

See Full Question And Answer at solutionrank.com

Write a routine to reconstruct the shortest paths from the algorithm in Section 10.3.4.

You are a tournament director and need to arrange a round robin tournament among N = 2k
players. In this tournament, everyone plays exactly one game each day; after N − 1 days, a
match has occurred between every pair of players. Give a recursive algorithm to do this.

The longest increasing subsequence problem is as follows: Given numbers a1, a2, . . . , aN, find
the maximum value of k such that ai1 < ai2 < • • • < aik, and i1 < i2 < • • • < ik. As an
example, if the input is 3, 1, 4, 1, 5, 9, 2, 6, 5, the maximum increasing subsequence has length
four (1, 4, 5, 9 among others

Explain how to implement first fit and best fit in O(N logN) time.

The clique problem can be stated as follows: Given an undirected graph G = (V, E) and an
integer K, does G contain a complete subgraph of at least K vertices? The vertex cover problem
can be stated as follows: Given an undirected graph G = (V, E) and an integer K, does G contain
a subset V' ⊂ V such that |V'| ≤ K

See Full Question And Answer at solutionrank.com

Show that quickselect with median-of-median-of-seven partitioning is linear. Why is median-of-


median-of-seven partitioning not used in the proof?

Part of the encoded file must be a header indicating the Huffman code. Give a method for
constructing the header of size at most O(N) (in addition to the symbols), where N is the number
of symbols.

a. Use the exponentiation algorithm to prove that 2340 ≡ 1 (mod 341). b. Show how the
randomized primality test works for N = 561 with several choices of A.

Prove that the height of a red-black tree is at most 2 logN, and that this bound cannot be
substantially lowered.
Show that none of the following greedy algorithms for chained matrix multiplication work. At
each step a. Compute the cheapest multiplication. b. Compute the most expensive multiplication.
c. Compute the multiplication between the two matrices Mi and Mi+1, such that the number of
columns in Mi is minimized (breaking

See Full Question And Answer at solutionrank.com

The baseball card collector problem is as follows: Given packets P1, P2, . . . , PM, each of which
contains a subset of the year's baseball cards, and an integer K, is it possible to collect all the
baseball cards by choosing ≤ K packets? Show that the baseball card collector problem is NP-
complete.

Show the optimal binary search tree for the following words, where the frequency of occurrence
is in parentheses: a (0.18), and (0.19), I (0.23), it (0.21), or (0.19).

Abstractly, generalize the k-d heap so that only levels that branch on key #1 have two children
(all others have one). a. Do we need links? b. Clearly, the basic algorithms still work; what are
the new time bounds?

Show how the recursive multiplication algorithm computes XY, where X = 1234 and Y = 4321.
Include all recursive computations.

Two point sets are homometric if they yield the same distance set and are not rotations of each
other. The following distance set gives two distinct point sets: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 16, 17}. Find the two point sets.

See Full Question And Answer at solutionrank.com

Two 70×70 matrices can be multiplied using 143,640 multiplications. Show how this can be
used to improve the bound given by Strassen's algorithm.

In Chapter 5, we described rehashing: When a table becomes more than half full, a new table
twice as large is constructed, and the entire old table is rehashed. Give a formal amortized
analysis, with potential function, to show that the amortized cost of an insertion is still O(1).

The input is a collection of currencies and their exchange rates. Is there a sequence of exchanges
that makes money instantly? For instance, if the currencies are X, Y, and Z and the exchange rate
is 1 X equals 2 Ys, 1 Y equals 2 Zs, and 1 X equals 3 Zs, then 300 Zs will buy 100 Xs, which in
turn will buy 200 Ys, which

Let A be an N-by-N matrix of zeros and ones. A submatrix S of A is any group of contiguous
entries that forms a square. a. Design an O(N2) algorithm that determines the size of the largest
submatrix of ones in A. For instance, in the matrix that follows, the largest submatrix is a 4-by-4
square. 10111000 00010100 0
A deque with heap order is a data structure consisting of a list of items, on which the following
operations are possible: push(x): Insert item x on the front end of the deque. pop(): Remove the
front item from the deque and return it. inject(x): Insert item x on the rear end of the deque.
eject(): Remove the rear

See Full Question And Answer at solutionrank.com

What is the maximum depth of a Fibonacci heap?

As a result of a splay, most of the nodes on the access path are moved halfway towards the root,
while a couple of nodes on the path move down one level. This suggests using the sum over all
nodes of the logarithm of each node's depth as a potential function. a. What is the maximum
value of the potential function? b.

In the game of chess, a knight in row R and column C may move to row 1 ≤ R' ≤ B and
column 1 ≤ C' ≤ B (where B is the size of the board) provided that either |R - R'| = 2 and |
C - C'| = 1 or |R - R'| =1 and |C - C'| = 2 A knight's tour is a sequence of moves that visits all
squares exactly once before ret

Suppose a binomial queue of N = 2k − 1 elements is built. Alternately perform M insert and
deleteMin pairs. Clearly, each operation takes O(logN) time. Why does this not contradict the
amortized bound of O(1) for insertion?

Draw a suffix tree and show the suffix array and LCP array for the following input strings: a.
ABCABCABC b. MISSISSIPPI

See Full Question And Answer at solutionrank.com

Using the potential function in the proof of the splay tree bound, what is the maximum and
minimum potential of a splay tree? By how much can the potential function decrease in one
splay? By how much can the potential function increase in one splay? You may give Big-Oh
answers.

Consider the problem of right-justifying a paragraph. The paragraph contains a sequence of


words w1, w2, . . . , wN of length a1, a2, . . . , aN, which we wish to break into lines of length L.
Words are separated by blanks whose ideal length is b (millimeters), but blanks can stretch or
shrink as necessary (but must be

Argue that for the closest-points algorithm, the average number of points in the strip is O( √N).

One form of the knapsack problem is as follows: We are given a set of integers A = a1, a2, . . . ,
aN and an integer K. Is there a subset of A whose sum is exactly K? a. Give an algorithm that
solves the knapsack problem in O(NK) time. b. Why does this not show that P = NP?

Show that every AVL tree can be colored as a red-black tree. Are all red-black trees AVL?
See Full Question And Answer at solutionrank.com

a. Prove that in a round robin tournament it is always possible to arrange the players in an order
pi1 , pi2 , . . . , piN such that for all 1 ≤ j < N, pij has won the match against pij+1. b. Give an
O(N logN) algorithm to find one such arrangement. Your algorithm may serve as a proof for part
(a).

Consider the recursive algorithm in Figure 10.80 for finding the shortest weighted path in an
acyclic graph, from s to t. a. Why does this algorithm not work for general graphs? b. Prove that
this algorithm terminates for acyclic graphs. c. What is the worst-case running time of the
algorithm?

Show that using a stack instead of a queue in the previous exercise is bad, by giving a sequence
that leads to Ω(N) cost per operation. This is the left-to-right single-pass merge.

Show that the greedy algorithm to minimize the mean completion time for multiprocessor job
scheduling works.

A file contains only colons, spaces, newlines, commas, and digits in the following frequency:
colon (100), space (605), newline (100), comma (705), 0 (431), 1 (242), 2 (176), 3 (59), 4 (185),
5 (250), 6 (174), 7 (199), 8 (205), 9 (217). Construct the Huffman code.

See Full Question And Answer at solutionrank.com

a. Show that XLYR + XRYL = (XL + XR) (YL + YR) − XLYL − XRYR b. This gives an
O(N1.59) algorithm to multiply N-bit numbers. Compare this method to the solution in the text.

Show that if the items are sorted, then a treap can be constructed in linear time, even if the
priorities are not sorted.

The longest common subsequence problem is as follows: Given two sequences A = a1, a2, . . . ,
aM, and B = b1, b2, . . . , bN, find the length, k, of the longest sequence C = c1, c2, . . . , ck such
that C is a subsequence (not necessarily continguous) of both A and B. As an example, if A =
d,y,n,a,m,i,c and B = p,r,

When do M consecutive insertions into a binomial queue take less than 2M time units?

What is the optimal way to compute A1A2A3A4A5A6, where the dimensions of the matrices are
A1: 10 × 20, A2: 20 × 1, A3: 1 × 40, A4: 40 × 5, A5: 5 × 30, A6: 30 × 15?

See Full Question And Answer at solutionrank.com

Why is it important that Strassen's algorithm does not use commutativity in the multiplication of
2 × 2 matrices?

You might also like