Questions
GVC_E(V,E) 1. C =Φ 2. while ( E≠ Φ) 3. do 4. { select an edge...

GVC_E(V,E)

1. C =Φ

2. while ( E≠ Φ)

3. do

4. { select an edge (u,v)∈E;

5. C = C∪{u}∪{v};

6. delete u and v from V and edges with u or v as an endpoint from E;

7. }

8. for each u∈C

9. { if C\{u} is a valid cover;

10. C = C\{u};

11. }

How can I complete the pseudo code on line 4 and line 8 by adding a heuristic specifying how to select a node

In: Computer Science

a.)  Let T be a binary tree with n nodes. Define the lowest common ancestor (LCA) between...

a.)  Let T be a binary tree with n nodes. Define the lowest common ancestor (LCA) between two nodes v and w as the lowest node in T that has both v and w as descendants. Given two nodes v and w, write an efficient algorithm, LCA(v, w), for finding the LCA of v and w. Note: A node is a descendant of itself and v.depth gives a depth of a node v.

b.) What is the running time of your algorithm? Give the asymptotic tight bound (Q) of its running time in terms of n and justify your answer.

In: Computer Science

Let f : V mapped to W be a continuous function between two topological spaces V...

Let f : V mapped to W be a continuous function between two topological spaces V and W, so that (by definition) the preimage under f of every open set in W is open in V : Y is open in W implies f^−1(Y ) = {x in V | f(x) in Y } is open in V. Prove that the preimage under f of every closed set in W is closed in V . Feel free to take V = W = R^n to simplify things. Hint: show that the “preimage of” operation plays nice with set-complements, and then use the fact that every closed set is the complement of some open set. Note that R^n is both open and closed as a subset of itself.

In: Advanced Math

For each of the following statements, determine whether the statement is true or false. If you...

For each of the following statements, determine whether the statement is true or false. If you say the statement is true, explain why and if you say it is false, give an example to illustrate.

(a) If {u, v} is a linearly independent set in a vector space V, then the set {2u + 3v, u + v} is also a linear set independent of V.

(b) Let A and B be two square matrices of the same format. Then det (A + B) = det (A) + det (B).

(c) It is possible to find a non-zero square matrix A such that A^2 = 0.

(d) Let V be a vector space. If {v1, v2,. . . , vn} (with n ≥ 1) is a base of V and if {w1, w2,. . . , wm} is a generator system of V then n ≤ m.

In: Math

V and W are finite dimensional inner product spaces,T: V→W is a linear map 1A: Give...

V and W are finite dimensional inner product spaces,T: V→W is a linear map

1A: Give an example of a map T from R2 to itself (with the usual inner product) such that〈Tv,v〉= 0 for every map.

1B: Suppose that V is a complex space. Show that〈Tu,w〉=(1/4)(〈T(u+w),u+w〉−〈T(u−w),u−w〉)+(1/4)i(〈T(u+iw),u+iw〉−〈T(u−iw),u−iw〉

1C: Suppose T is a linear operator on a complex space such that〈Tv,v〉= 0 for all v. Show that T= 0 (i.e. that Tv=0 for all v).

In: Advanced Math

Let V = R^2×2 be the vector space of 2-by-2 matrices with real entries over the...

Let V = R^2×2 be the vector space of 2-by-2 matrices with real entries over
the scalar field R. We can define a function L on V by
L : V is sent to V
L = A maps to A^T ,
so that L is the “transpose operator.” The inner product of two matrices B in R^n×n and C in R^n×n is usually defined to be
<B,C> := trace (BC^T) ,
and we will use this as our inner product on V . Thus when we talk about
elements B,C in V being orthogonal, it means that <B,C> := trace (BC^T) = 0.
Problem 1.
1. First show that L is linear, so that L in B (V ).
2. Now choose a basis for the vector space V = R^2×2, and find the matrix of
L with respect to your basis.

In: Advanced Math

python Create a dictionary and insert several English words as keys and the Pig Latin (or...

python

  1. Create a dictionary and insert several English words as keys and the Pig Latin (or any other language) translations as values.

  2. Write a function called bonus that takes as a parameter a dictionary that has names as keys and salaries as values. Your function should increase everyone’s salary in the dictionary by 5%.

  3. Write a function called updateAge that takes as parameters a list of names of people whose birthday it is today, and a dictionary that has names as keys and ages as values. Your function should increment the age in the dictionary of each person whose birthday it is today.

  4. Write a function called seniorList that takes as a parameter a dictionary that has names as keys and class years as values. Your function should return a list of names of students who are graduating in 2020.

  5. Write a function called union that takes as parameters two dictionaries and returns a new dictionary with the entries of both. For common keys, take the value of the first dictionary.

In: Computer Science

What program would you write to solve the following problems and why does it work? Please...

What program would you write to solve the following problems and why does it work? Please also comment on other students’ code at least three times. 1) Write code to partition a linked list around a value x, such that all nodes less than x come before all nodes greater than or equal to x. If x is contained within the list, the values of x only need to be after the elements less than x. The partition element x can appear anywhere in the “right partition”; it does not need to appear between the left and right partitions. Input: 3à5à8à5à10à2à1 (partition=5) Output: 3à1à2à10à5à5à8. 2) Write a method that finds the maximum of two numbers. You should not use if-else or any other comparison operator. 3) Write methods to implement the multiply, subtract and divide operations for integers. The results of all of these are integers. Use only the add operator.

In: Computer Science

In java What program would you write to solve the following problems and why does it...

In java What program would you write to solve the following problems and why does it work? Please also comment on other students’ code at least three times. 1) Write code to partition a linked list around a value x, such that all nodes less than x come before all nodes greater than or equal to x. If x is contained within the list, the values of x only need to be after the elements less than x. The partition element x can appear anywhere in the “right partition”; it does not need to appear between the left and right partitions. Input: 3à5à8à5à10à2à1 (partition=5) Output: 3à1à2à10à5à5à8. 2) Write a method that finds the maximum of two numbers. You should not use if-else or any other comparison operator. 3) Write methods to implement the multiply, subtract and divide operations for integers. The results of all of these are integers. Use only the add operator.

In: Computer Science

1) The number of times that student takes an A class, X(X has a line under)...

1) The number of times that student takes an A class, X(X has a line under) has the discrete uniform pmf: p(x) = 0.25 for x = 1,2,3,4. Recall from earlier course material that this pmf has E(X)(X has a line under)=5/2 and V(X)(X has a line under)= 15/12. A random sample of 36 students will be selected and the number of times that have taken A class will be recorded.
-Determine the probability that the mean of this sample is less that 3.

2)The lysine composition is soybean meal was measured in 9 random samples resulting in a sample mean of 22.4 g/kg and standard deviation of 1.2g/kg. Construct a 2-sided 99% confidence interval on the population standard deviation. Assume that the population is normally distributed. What is the estimated of the lower bound of this confidence interval?

In: Statistics and Probability