Search results

  1. K

    Anyone know prolog?

    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...
  2. K

    Java How do display/generate webpage content with info from an array in a .java file?

    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.
  3. K

    Context-free grammar: derivations and ambiguity

    Can I just draw the two parse trees of the two different derivations of the same string and come to the conclusion that the language is ambigious?
  4. K

    Context-free grammar: derivations and ambiguity

    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...
  5. K

    Simplifying regular expression?

    Hmm, so it cannot be simplified to something really short ie. (a|b|c)*b (which is wrong) as it seems. Thanks.
  6. K

    Simplifying regular expression?

    Does anyone know if this regular expression can be simplified? (a*bc*bc*|c*)*b I tried (a|b|c)*b, but it's not correct.
  7. K

    XQuery XML help

    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...
  8. K

    Minimum closure of F (functional dependencies) help

    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...
  9. K

    Help Joining Two Tables in SQL?

    That worked. Thanks a lot for your help!
  10. K

    Help Joining Two Tables in SQL?

    Thanks, that worked, but what do you need to add if there are duplicate entires in Table 1? ie. Table 1 A B 1 4 1 4 2 5 3 6 Using the latest query you wrote, I get the resulting table: Table 1 A B C 1 4 6 2 5 3 6 One of the same 1 4 entry is removed. I tried taking out the...
  11. K

    Help Joining Two Tables in SQL?

    Thanks for the reply. I just gave that a try and it did the following: Result A B C 1 4 2 5 3 6 1 4 6 I'm using PSQL PostgresSQL to do this stuff. Should it be the same with your tsql code? Because I get the table above when doing your example.
  12. K

    Help Joining Two Tables in SQL?

    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...
  13. K

    Big-O and big-omega question

    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...
  14. K

    Dijkstra's algorithm proof?

    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.
  15. K

    Finding a constant for a partial differential equation

    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...
  16. K

    Computer science proving big-O definition

    Alright, I will give that a try, thanks.
  17. K

    Computer science proving big-O definition

    Whoops, I meant that I solved for (f - g)' because we want to know when the function is >= 0 and not less than 0. Am I doing the right thing?
  18. K

    Computer science proving big-O definition

    Hmm, I couldn't really think of an algebraic way of capturing that, but what I did was find the derivative of f and g. Then I solved for g'(n) - f'(n) = 0 and got n = 133.3 and -0.12. However, I do not know how to better show that f is less than c * g(n) for n >= 210. btw, I solved the |f -...
  19. K

    Computer science proving big-O definition

    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...
  20. K

    Showing a set is bounded

    Alright, I'll ditch the compact idea. Thanks a lot HallsOfIvy
  21. K

    Showing a set is bounded

    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...
  22. K

    Converting 29 and 0.7 to IEEE single precision floating point

    Yes, but how would you represent that in mantissa? I'll check out that link mathmike, thanks.
  23. K

    Converting 29 and 0.7 to IEEE single precision floating point

    Hi, I just need to convert it. Not writing a program.
  24. K

    Converting 29 and 0.7 to IEEE single precision floating point

    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...
  25. K

    Summation of n^2k. k = 1 to infinity

    Thanks for the confirmation.
  26. K

    Summation of n^2k. k = 1 to infinity

    Is the summation of k = 1 to infinity for n2k equal to n2 / (1 - n2)?
  27. K

    Antiderivative of the following function

    Yup, I checked it with both the first and the second integral and no dice. The antiderivative for \int \frac{4}{(4 + x^2)} \ dx is 2tan^{-1}(x/2)
  28. K

    Antiderivative of the following function

    Yup, that's what I got after the substitution and working. Sorry for replying so late. I finally had a chance to do this question just now. \int \frac{16}{(4 + x^2)^2} \ dx = \frac{32sec^{2}\Theta}{(4 + 4tan^{2}\Theta)^2} d theta where x = 2tan\Theta \ dx = 2 sec^{2}\Theta d theta...
  29. K

    Mathematica Mathematical induction question?

    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...
  30. K

    Antiderivative of the following function

    Alright, thanks. I'll just try it again.
  31. K

    Antiderivative of the following function

    Thanks. However, can you spot my mistake when solving for the antiderivative of (4/ (4 + x2)2)? I must be doing something wrong, but I can't find what (4/ (4 + x2)2) Let x = 2 tan theta dx = 2 sec2theta dtheta = (8 sec2theta / ((4 + 4tan2theta)2) factor out a 2 = 4 + 4 tan2 theta...
  32. K

    Antiderivative of the following function

    Thanks for the reply. Am I on the right track? 4x2 / (4 + x2)2 dx = (4x2 + 16 - 16) / (4 + x2)2 dx = 4((x2 + 4) - 4)) / (4 + x2)2 dx = (4 / (4 + x2)) - (4/ (4 + x2)2) dx
  33. K

    Antiderivative of the following function

    Hmm, any hint on what the clever algebra should be? I can't really figure it out from here. I have simplified the equation down to 4x2 / (4 + x2)2 dx using x = u2
  34. K

    Determining max and min pts of a polar curve

    Thanks. btw, how did you plot those graphs in graphmatica? edit - I also realized I made a typo with the equation. It's suppose to be r = 3 + sin q and not r = 3 sin q.
  35. K

    Determining max and min pts of a polar curve

    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...
  36. K

    Antiderivative of the following function

    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...
  37. K

    What property to look for to see if a matrix is diagonalizable?

    Thanks a bunch guys. Had my exam today!
  38. K

    What property to look for to see if a matrix is diagonalizable?

    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
  39. K

    Determinant proof

    Thanks everyone!
  40. K

    Determinant proof

    Hmm, so is this the correct method of doing it? det(A + B^T) = det(A^T + B) det(A + B^T)^T = det(A^T + B)^T det(A^T + B) = det(A + B^T) I can't do this, correct? Thanks for the hints though.
  41. K

    Determinant proof

    Is this proof correct? Show that det(A + B^T) = det(A^T + B) det(A + B^T) = det(A^T + B) det(A) + det(B^T) = det(A^T) + det(B) det(A) + det(B) = det(A) + det(B) Thanks.
  42. K

    Determinants and Matrix Inverses Proofs

    Thanks a bunch guys. It's all clear now.
  43. K

    Determinants and Matrix Inverses Proofs

    Thanks for the responses, so is this correc then? I tried it, but I am stuck. 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. det(AB) = det(-BA) detA detB = det(-B) detA detA detB = (-1)^n detB detA 1 = -(1)^n Is this correct...
  44. K

    Determinants and Matrix Inverses Proofs

    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...
  45. K

    Another linear transformation question

    Understood. Thanks a lot
  46. K

    Another linear transformation question

    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...
  47. K

    Inverse of a Linear Transformation

    Dumb question, but how do we get the identity by doing T T-1? Isn't that undefined/does not exist? Unless I'm missing something here.
  48. K

    Inverse of a Linear Transformation

    To make my question more clear, in the following example, how come x + 5y becomes x - 5y? The question basically says to let T be the transformation induced by an invertible 2x2 matrix A. In each case, interpret T^-1 geometrically. For this question, A = 1 5 0 1...
  49. K

    Inverse of a Linear Transformation

    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?
Top