Recent content by Trentonx

  1. T

    Help understanding Non-determinate Finite Automaton

    Homework Statement There's not a particular problem, per se, just that I seem to be missing something with my understanding of how to evaluate a string against a non-deterministic finite automaton with epsilon transitions. But one I've been working with is shown below Homework Equations NA...
  2. T

    Comp Sci Getting ArrayOutOfBoundsException - java

    Well, I didn't look at when manyItems was updated, but if it is like array.size (or whatever Java calls it), then because arrays are zero-indexed, you loop or access from array.size - 1 or use a strictly less than test. Do you see why that is? Aside, that's an odd way to get a random out of an...
  3. T

    Comp Sci Getting ArrayOutOfBoundsException - java

    Is the ArrayBag provided code that is supposed to work fine, or was this something that you wrote as well? The most helpful, and likely easier method would be to use a debugger. Set a breakpoint at i = (int)(Math.random( ) * manyItems) + 1; and see that data has items, and that i doesn't go...
  4. T

    Help with my big oh algorithm analaysis

    Any attempt at a solution? Where have you gotten so far? As a small hint, O(n) is the worst case, so look at those loops and think where the most steps can be taken.
  5. T

    Extract URLs with regexp - Homework Solution

    That worked with a little modification. I realized I wanted to match right before the http, so as not to remove it. I used '^.*="' which somehow dodn't match the other same expressions in the file. So now, how does it do it? The ^ is an anchor to the start of a line, and the * is a wildcard...
  6. T

    Extract URLs with regexp - Homework Solution

    Homework Statement I have a file that contains lines like the following: <td><divalign="center"><fontcolor="#0000ff"face="Arial,Helvetica,sans-serif"size="2"><strong><ahref="http://www.yahoo.com/">Yahoo!</a></strong></font></div></td>...
  7. T

    Can Induction Prove the Equality of Cubic and Square Sums?

    Homework Statement Prove by induction \sum\limits_{i=0}^n i^3 = (\sum\limits_{i=0}^N i)^2 Homework Equations The Attempt at a Solution So I used N=1 and found that indeed, 1^3 = (1)^2 Then I assumed it was valid up to some limit k, and tried to find it for k+1...
  8. T

    How to Convert 33.9 to Binary?

    Except for the bit where the binary is infinite, that's not too bad. Thanks for the help. On a related note does vela's way work to convert to octal and hexadecimal the same way?
  9. T

    How to Convert 33.9 to Binary?

    Homework Statement Convert 33.9 to binary. Homework Equations Division by two and remainders The Attempt at a Solution I'm unsure since it is .9. Using the dividing by two method with the remainders wouldn't account for that. Could I do something like this? 33.9 = 339 *10^-1...
  10. T

    How Do You Calculate Thevenin Equivalent for a Battery with Different Loads?

    I see my error know. I was treating the current as the same for both of the circuits, leading to an incorrect cancellation. Thanks for putting my on the right track.
  11. T

    How Do You Calculate Thevenin Equivalent for a Battery with Different Loads?

    Homework Statement An automobile battery when connected to a car radio provides 12.5 V to the radio. When connected to the headlights, it provides 11.7 V. Assume the radio is modeled as 6.25 ohm resistor and the headlights are .65 ohms. Find the Thevenin Equivalent for the battery...
  12. T

    Solving Thevenin Equivalents: Techniques and Steps

    Homework Statement Compute the values of the Thévenin equivalent seen by the 20 kΩ resistor using circuit analysis techniques. Draw the equivalent circuit and list the values. Homework Equations V=IR Nodal analysis mesh analysis The Attempt at a Solution I know a Thévenin...
  13. T

    Finding Viscous Damping Constamt

    Homework Statement I am working with a problem of damped harmonic motion. I am given that the motion is in a medium that exerts a force of 2N when the speed is 4 cm/s. The mass is 5kg. Homework Equations C = F/v The Attempt at a Solution I thought that the viscous damping...
  14. T

    How Do Surface Charge Densities Calculate on a Conducting Spherical Shell?

    So I found the charge densities, and it makes sense, as 4 µC were attracted to the inside of the sphere, since -4 µC were enclosed and left 1µC on the outer surface. Now, the follow up questions are asking about the electric field at various radii. (b) Calculate the net radial electric field...
  15. T

    How Do Surface Charge Densities Calculate on a Conducting Spherical Shell?

    Alright, so I need to find the "spread" of charges, how much remained on the outside surface, and how much went towards the inside. How do I apply Gauss's law then? Can I assume that 4 µC of the sphere's charge went to the inner surface then to compensate for the charge inside?
Back
Top