Does anyone here know Prolog? I'm using the SWI-Prolog interpreter.
Given this list: [[1, 2], [2, 3], [3, 4]] how do you make it say Yes if 2 (of the first list) = 2 (of second list) and 3 (of second list) = 3 (of third list)? I'm having trouble visualizing this fact as the elements in the...
Does anyone know how I would go about displaying/generating webpage content with info from an array in a .java file?
Suppose you click on cars.com, once you do, the webpage will display the contents (say car names) of an array from a .java file. How do I do this?
Thanks.
I have a question regarding about CFGs, derivations, and ambiguity.
Say you are given some CFG that produces A, B, or C
You are able to come up with two different derivations for A
To say the CFG that produces A, B, or C is ambiguous, you must find two different parse trees for some...
I have to write an XQuery that for example, "returns a list of books for a given author".
The "given author" in this case can be anything. Therefore, I was wondering what do I need to add to give the query someting, which in return, it will process it.
For example,
for $x in...
Homework Statement
F = {S -> NOPQZVWX, NX -> UV, NXT -> RY, YQ -> NXR, QZ -> S, PQ -> S}
Find the minimum closure of F.
Homework Equations
none
The Attempt at a Solution
So far I have made RHS of each FD into a single attribute and then I eliminated redundant attributes from...
I'm having trouble getting the following work. Can anyone help me?
I have two tables that look like the following:
Table 1 Table 2
A B A B C
1 4 1 4 6
2 5
3 6
How do I join both of them such...
Hi,
I am a bit confused here. Just say you're given code and it says to show the best-case analysis and the worst-case analysis. When you show the best-case, what should the answer be in? In big-O or big-omega? Similarly, if you show the worst-case, what should the answer be in? big-O or...
Does anyone here know how to prove this? I'm stuck on how to even get this started.
Let G be a connected, weighted and undirected graph where all edges have a weight of 1.
Prove that if Dijkstra's algorithm is run on this graph, G, then the tree returned is a breadth-first tree.
Can anyone help me with this question? I tried taking the derivative of u with respect to x and then summed the third derivative, but I'm getting nowhere. Any help would be great, thanks.
Let u(x1, x2, … , xn) = http://img480.imageshack.us/img480/1694/image0027hm.gif [Broken],[/URL] where a...
I have two questions here.
I must prove that f(n) = 100n^2 + 5n + 10 is in big-O of g(n) = n^3 - 100n^2
I already found a constant c and an n that satisfies the condition such that f(n) \leq c * g(n). Let c = 1 and n = 201.
However, I am stuck on showing/manipulating the algebra that this is...
Q: Show that every bounded set in R has a least upper bound. Using either
"Every monotonic and bounded sequence is convergent" or
"Every bounded sequence has an accumulation point" or
"Every bounded sequence has a convergent subsequence"
I'm not really sure how to start this out, but would...
I am having difficulty in converting 29 and 0.7 to IEEE single precision floating point.
For 29,
I represent 29 as a product of a power of 2 using 58/4 * 21.
However, I am having trouble getting the mantissa value because 58/4 is 14.5, and I need something in the format of 1.[numbers]. Any...
Q: When a binary number is incremented by 1, there may be a carry that may carry over several bit positions i.e. 1010111 is incremented and the carry distance is 3. Given a natural number n, find the average carry distance when incrementing a binary number b in the inverval 2n <=b <= 2n+1...
Determine the maximum and minimum values of the curvature at points of the polar curve r = 3 + sin q.
I know that the polar curve, r = 3 + sin q is sort of similar to an upside down heart when graphed. However, I am not sure what to do when finding the maximum and minimum values of the...
How would you guys come about getting the antiderivative for the following function?
8u^5 / ((4 + u^4)^2)
I tried rearranging the equation like the following:
8u^5 * ((4 + u^4)^(-2)), but it's not really getting me anywhere. I tried to do a u substitution, but can't find one where it...
Hi,
Just say you are given a 3x3 matrix with a value k in it. What would be the best way to find out if it is diagonalizable or not for certain values of k? The matrix in question is
-1 0 0
k 1 0
-2 1 -1
Can anyone help me start this out? I got absolutely no clue.
Q: If A and B are n x n matrices, AB = -BA, and n is odd, show that either A or B has no inverse.
I know that we have to show that either det A is 0 or det B is 0, but I have no clue how to show it with the given information...
Q: In each case, show that T is not a linear transformation.
T[x y]^T = [0 y^2]^T
A: If X = [0 1]^T then T(2X) = [0 4]^T while 2T(X) = [0 2]^T
I don't quite understand this solution. What are we trying to accomplish here? So, since T(2X) = [0 4]^T while 2T(X) = [0 2]^T do not yeild...
Hi,
Is there a formula to do this? The textbook just says to "reverse" the action of T to get T^-1 (T inverse). Can someone explain to me in laymen terms, how to accomplish this? For example,
For T = [2x y]^T is T^-1 = [-2x y]^T?
Q: If A is an m x n matrix and rank A = m, show that m <= n.
I know that by definition if A is m x n, then rank A <= m and rank A <= n. However, I do not know how I would do this if rank A = m.
Any help would be great thanks.
Q: Determine whether U is a subspace of R^3.
U = {[0 s t]^T | s and t in R}
A: Yes. U = span {[0 1 0]^T, [0 0 1]}
Can someone explain to me how the heck they come up with that answer? Seems so random.
How do I calculate the PDF of someone's earning followed by their mean and variance?
This is the question:
Given density function
f(x) = 2.5 if 0.1 < x < 0.5
0 otherwise
The person is paid by the # of jobs they finish rather than by the hour. They get 10$/job. Calculate...
Q: The simplest error detection scheme used in data communication is parity-checking. Messages sent consists of characters, each character consisting of a number of bits, 0 or 1. In parity checking, a 0 or a 1 is appended to the end to make the number of 1's even. The receiver checks the number...
Let P1 = P1(2, 1, -2) and P2 = P2(1, -2, 0). Find the coordinates of P, which is 1/4 the way from P2 to P1.
The answer is P = P(5/4, -5/4, -1/2)
Can someone explain to me the concept of this? I don't quite understand it. So basically we are suppose to find a vector P that is 1/4 away from...
A hash table is a storage structure that calculates the storage address from a record key, k where f1(k) returns the storage address. Sometimes the hash function returns the same address for several keys (called collision). To fix this problem, a scheme called secondary hashing uses a sequence...
I'm having a bit of trouble in coming up with the solution for this question
A hard disk manufacturing process desposites a thin coating of magnetic material on a plastic substrate. Empirical measurement has shown that the process introduces 20 defects per 15000cm squared. A disk pack...
I was doing a few practice questions and was a bit confused about how the solution manual manipulated the I identity matrix. For example,
Just say you had the following
I - 2A = B
where A and B are 2x2 matrices. B is given, but we need to find A.
Therefore, shouldn't it be
-2A =...