Recent content by KataKoniK

  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, 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) = [Broken],[/URL] where a...