All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Ask a Question
Search
Search
Sign In
Register
study help
computer science
introduction to algorithms
Questions and Answers of
Introduction to Algorithms
Why didn’t we use the integral approximation (A.12) directly on Pnk = 1 1/k to obtain an upper bound on the nth harmonic number?
Prove that by using the linearity property of summations. E=1 0(ft(i)) = 0(E-1 fi(i)) un Lk=1 Lk=1
Evaluate the product I-12. 4*. k=1
Evaluate the product Tk=2(1 – 1/k²).
Let A and B be finite sets, and let f : A → B be a function. Show thata. if f is injective, then |A| ≤ |B|;b. if f is surjective, then |A| ≥ jBj.
Attendees of a faculty party shake hands to greet each other, and each professor remembers how many times he or she shook hands. At the end of the party, the department head adds up the number of
Draw all the free trees composed of the three vertices x, y, and z. Draw all the rooted trees with nodes x, y, and z with x as the root. Draw all the ordered trees with nodes x, y, and z with x as
Given an undirected graph G = (V, E), a k-coloring of G is a function c . V → {0, 1, . . . , k – 1} such that c(u) ≠ c(ν) for every edge (u, ν) ∈ E. In other words, the numbers 0, 1, . . .
Prove that the subset relation “⊆” on all subsets of ℤ is a partial order but not a total order.
Show that for any positive integer n, the relation “equivalent modulo n” is an equivalence relation on the integers. (We say that a ≡ b (mod n) if there exists an integer q such that a − b =
Is the function f (x) = x + 1 bijective when the domain and the codomain are ℕ? Is it bijective when the domain and the codomain are ℤ?
Show that if a directed or undirected graph contains a path between two vertices u and ν, then it contains a simple path between u and ν. Show that if a directed graph contains a cycle, then it
Let G = (V, E) be a directed acyclic graph in which there is a vertex ν0 ∈ V such that there exists a unique path from ν0 to every vertex ν ∈ V. Prove
Reword each of the following statements as a theorem about undirected graphs, and then prove it. Assume that friendship is symmetric but not reflexive.a. Any group of at least two people contains at
Prove the generalization of DeMorgan?s laws to any finite collection of sets: A1 N A2 N ……n An A1 U A2 U … … U An AjU A, U•…U An , A¡N A2 N ……n An .
Give examples of relations that area. reflexive and symmetric but not transitive,b. reflexive and transitive but not symmetric,c. symmetric and transitive but not reflexive.
Give a natural definition for the inverse of a binary relation such that if a relation is in fact a bijective function, its relational inverse is its functional inverse.
Show that any connected, undirected graph G = (V, E) satisfies |E| ≥ |V| − 1.
Show by induction that the number of degree-2 nodes in any nonempty binary tree is 1 fewer than the number of leaves. Conclude that the number of internal nodes in a full binary tree is 1 fewer than
Many divide-and-conquer algorithms that operate on graphs require that the graph be bisected into two nearly equal-sized subgraphs, which are induced by a partition of the vertices. This problem
Let S be a finite set, and let R be an equivalence relation on S × S. Show that if in addition R is antisymmetric, then the equivalence classes of S with respect to R are singletons.
Give a bijection from ℤ to ℤ × ℤ.
Verify that in an undirected graph, the “is reachable from” relation is an equivalence relation on the vertices of the graph. Which of the three properties of an equivalence relation hold in
Use induction to show that a nonempty binary tree with n nodes has height at least ⌈lg n⌋.
Show that the set of odd natural numbers is countable.
Professor Narcissus claims that if a relation R is symmetric and transitive, then it is also reflexive. He offers the following proof. By symmetry, a R b implies b R a. Transitivity, therefore,
The internal path length of a full binary tree is the sum, taken over all internal nodes of the tree, of the depth of each node. Likewise, the external path length is the sum, taken over all leaves
Show that for any finite set S, the power set 2S has 2|S| elements (that is, there are 2|S| distinct subsets of S).
Show that we can represent a hypergraph by a bipartite graph if we let incidence in the hypergraph correspond to adjacency in the bipartite graph. Let one set of vertices in the bipartite graph
Let us associate a “weight” w(x) = 2 − d with each leaf x of depth d in a binary tree T, and let L be the set of leaves of T.
Give an inductive definition for an n-tuple by extending the set-theoretic definition for an ordered pair.
Show that if L ≥ 2, then every binary tree with L leaves contains a subtree having between L/3 and 2L/3 leaves, inclusive.
Verify axiom 2 of the probability axioms for the geometric distribution.
How many k-substrings does an n-string have? (Consider identical k-substrings at different positions to be different.) How many substrings does an n-string have in total?
In this problem, we investigate the effect of various assumptions on the number of ways of placing n balls into b distinct bins.a. Suppose that the n balls are distinct and that their
Professor Rosencrantz flips a fair coin once. Professor Guildenstern flips a fair coin twice. What is the probability that Professor Rosencrantz obtains more heads Professor Rosencrantz flips a fair
Suppose we roll two ordinary, 6-sided dice. What is the expectation of the sum of the two values showing? What is the expectation of the maximum of the two values showing?
How many times on average must we flip 6 fair coins before we obtain 3 heads and 3 tails?
An n-input, m-output boolean function is a function from {TRUE, FALSE}n to {TRUE, FALSE}m. How many n-input, 1-output boolean functions are there? How many
Prove?Boole?s inequality: For any finite or countably infinite sequence of events A1, A2, ..., Pr {Aj U A2 U …} < Pr{A1} +Pr {A2} + • · .
An array A[1 . . n] contains n distinct numbers that are randomly ordered, with each permutation of the n numbers being equally likely. What is the expectation of the index of the maximum element in
A carnival game consists of three dice in a cage. A player can bet a dollar on any of the numbers 1 through 6. The cage is shaken, and the payoff is as follows. If the player’s number doesn’t
Show that b (k ; n, p) = b (n – k ; n, q), where q = 1 – p.
Show that for all a > 0 and all k such that 0 k-1 k a' < (а + 1)" b(k;n,a/(а + 1)) па -k(а + 1) i=0
In how many ways can n professors sit around a circular conference table? Consider two seatings to be the same if one can be rotated to form the other.
Suppose we shuffle a deck of 10 cards, each bearing a distinct number from 1 to 10, to mix the cards thoroughly. We then remove three cards, one at a time, from the deck. What is the probability that
Argue that if X and Y are nonnegative random variables, then E [max (X, Y)] ≤ E [X] + E [Y ].
Show that value of the maximum of the binomial distribution b (k ; n, p) is approximately 1//2nnpq, where q = 1 – p.
Prove that if 0 k-1 kq < пр - nq n-k np - k \ k n – k i=0
In how many ways can we choose three distinct numbers from the set {1, 2, . . . ,99} so that their sum is even?
Prove that Pr {A | B} + Pr {A | B} = 1
Let X and Y be independent random variables. Prove that f (X) and g (Y) are independent for any choice of functions f and g.
Show that the probability of no successes in n Bernoulli trials, each with probability p = 1/n, is approximately 1/e. Show that the probability of exactly one success is also approximately 1/e.
Prove the identity for 0 п — 1 k \ n |n k k – 1
Prove that for any collection of events A1,?A2, . . . ,An, Pr {A1 N A2 N.…. N An} = Pr {A1} · Pr {A2 | A1} · Pr{A3 | A1 N A2}... Pr{A, | A1 N A, n..N An-1} ·
Let X be a nonnegative random variable, and suppose that E [X] is well defined. Prove Markov?s inequality: Pr {X > t} < E [X]/t
Professor Rosencrantz flips a fair coin n times, and so does Professor Guildenstern. Show that the probability that they get the same number of heads is (2nn)/4n. ?For Professor Rosencrantz, call a
Consider a sequence of?n?Bernoulli trials, where in the?i?th trial, for?i?=?1, 2, . . . ,n, success occurs with probability?pi?and failure occurs with probability?qi = 1 ? pi. Let X be the random
Prove the identity for 0 ? k In – 1) п — k n n k
Describe a procedure that takes as input two integers a and b such that 0 < a < b and, using fair coin flips, produces as output heads with probability a/b and tails with probability (b –
Let S be a sample space, and let X and X? be random variables such that X(s) ? X?(s) for all s ? S. Prove that for any real constant t, Pr {X > t} > Pr {X' > t} .
To choose k objects from n, you can make one of the objects distinguished and consider whether the distinguished object is chosen. Use this approach to prove that (:) - (":') - (:-) n | k k k – 1
Show how to construct a set of n events that are pairwise independent but such that no subset of k > 2 of them is mutually independent.
Which is larger: the expectation of the square of a random variable, or the square of its expectation?
Which is less likely: obtaining no heads when you flip a fair coin n times, or obtaining fewer than n heads when you flip the coin 4n times?
Consider n Bernoulli trials, where for i = 1, 2, . . . ,n, the i th trial has probability pi of success, and let X be the random variable denoting the total number of successes. Let p ? pi for all i
Two events A and B are conditionally independent, given C, if Give a simple but nontrivial example of two events that are not independent but are conditionally independent given a third event. Pr
Show that for any random variable X that takes on only the values 0 and 1, we have Var [X] = E[X] E [1– X].
Let X be the random variable for the total number of successes in a set A of n Bernoulli trials, where the i th trial has a probability pi of success, and
You are a contestant in a game show in which a prize is hidden behind one of three curtains. You will win the prize if you select the correct curtain. After youhave picked one curtain but before the
Show that for any integers n ≥ 0 and 0 ≤ k ≤ n, the expression (nk) achieves its maximum value when k = ⌊n/2⌋ or k = ⌈n/2⌉.
A prison warden has randomly picked one prisoner among three to go free. The other two will be executed. The guard knows which one will go free but is forbidden to give any prisoner information
Argue that for any integers n ? 0, j ? 0, k ? 0, and j + k ? n,? Provide both an algebraic proof and an argument based on a method for choosing j + k items out of n. Give an example in which
Use Stirling?s approximation to prove that 22n =(1+ 0(1/n)) 2n n
By differentiating the entropy function H (λ), show that it achieves its maximum value at λ = 1/2. What is H (1/2)?
Show that for any integer n ? 0, n k = n2"-1 k=0
Show that if A and B are symmetric n × n matrices, then so are A + B and A – B.
Prove that matrix inverses are unique, that is, if B and C are inverses of A, then B = C.
Given numbers x0, x1, . . . ,xn-1, prove that the determinant of the Vandermonde matrixisMultiply column i by – x0 and add it to column i + 1 for i = n – 1, n – 2, . . . ,1, and then use
Prove that (A B)T = BT AT and that AT A is always a symmetric matrix.
Prove that the determinant of a lower-triangular or upper-triangular matrix is equal to the product of its diagonal elements. Prove that the inverse of a lower-triangular matrix, if it exists, is
One class of permutations of the integers in the set Sn = {0, 1, 2, . . . , 2n − 1} is defined by matrix multiplication over GF (2). For each integer x in Sn, we view its binary representation as
Prove that the product of two lower-triangular matrices is lower-triangular.
Prove that if P is a permutation matrix, then P is invertible, its inverse is PT, and PT is a permutation matrix.
Prove that if P is an n × n permutation matrix and A is an n × n matrix, then the matrix product PA is A with its rows permuted, and the matrix product AP is A with its columns permuted. Prove that
Let A and B be n × n matrices such that AB = I. Prove that if A′ is obtained from A by adding row j into row i, then subtracting column i from column j of B yields the inverse B′ of A′.
Let A be a nonsingular n × n matrix with complex entries. Show that every entry of A − 1 is real if and only if every entry of A is real.
Show that if A is a nonsingular, symmetric, n × n matrix, then A − 1 is symmetric. Show that if B is an arbitrary m × n matrix, then
Prove that for any two compatible matrices A and B, rank (AB) ≤ min (rank(A), rank(B)), where equality holds if either A or B is a nonsingular square matrix.
This problem explores the space requirements for van Emde Boas trees and suggests a way to modify the data structure to make its space requirement depend on the number n of elements actually stored
As a function of the minimum degree t , what is the maximum number of keys that can be stored in a B-tree of height h?
Suppose that we insert the keys {1,2; . . . ,n} into an empty B-tree with minimum degree 2. How many nodes does the final B-tree have?
Describe the data structure that would result if each black node in a red-black tree were to absorb its red children, incorporating their children with its own.
Since leaf nodes require no pointers to children, they could conceivably use a different (larger) t value than internal nodes for the same disk page size. Show how to modify the procedures for
Suppose that we were to implement B-TREE-SEARCH to use binary search rather than linear search within each node. Show that this change makes the CPU time required O(lg n), independently of how t
Suppose that disk hardware allows us to choose the size of a disk page arbitrarily, but that the time it takes to read the disk page is a + bt, where a and b are specified constants and t is the
Suppose that a root x in a Fibonacci heap is marked. Explain how x came to be a marked root. Argue that it doesn’t matter to the analysis that x is marked, even though it is not a root that was
Professor Pinocchio claims that the height of an n-node Fibonacci heap is O(lg n). Show that the professor is mistaken by exhibiting, for any positive integer n, a sequence of Fibonacci-heap
Professor Pisano has proposed the following variant of the FIB-HEAP-DELETE procedure, claiming that it runs faster when the node being deleted is not the node pointed to by H.min. PISANO-DELETE(H,
Justify the O.1/ amortized time of FIB-HEAP-DECREASE-KEY as an average cost per operation by using aggregate analysis.
Showing 600 - 700
of 1549
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Last