# Search results

1. ### Linux/CentOS bash problem

hmm wrong forum maybe this should go to programming and computer science instead? Can I get a mod to help me out edit: actually please delete this thread I have my answer now :) thank you
2. ### Linux/CentOS bash problem

In bash, I am writing the following: ps - ly this command gives me output of three lines then I do: ps -ly | wc -l to read the number of lines. It says 4. I clearly see that there are three lines. Thinking that there might be a new line possibly, I open export the command output to a file...
3. ### Need help understanding what an ADT (abstract data type) is exactly

I've read quantum quests data structures bible but I'm still confused. I need help in simplest terms understanding what an ADT actually is and how it's different from a data structure. So a data structure is a way of organizing data. I can understand why a stack, or a queue would fall under...

5. ### Algorithm analysis problem turned into a math problem

That is one amazing resource man. I am only able to skim through it right now but I can already tell I'm going to be coming back to that a LOT! Much love for that man
6. ### I don't understand my prof's notes relating to time complexity

Problem Statement: I've attached a picture of his notes. For a sorted array, to update it he put: O(logn)+O(1) Relevant Equations: O(n) + O(logn) = O(n) I don't see how it can be O(logn)+O(1) and not O(logn)+O(n) in the worst case After you find the index that needs updating, and you...
7. ### Algorithm analysis problem turned into a math problem

The equation listed is the implicit form. I achieved this a weird way. \begin{array}{|c|c|c|} \hline 1 & 1 & 1*1 \\ \hline 2 & 6 & 2*3 \\ \hline 3 & 18 & 3*6 \\ \hline 4 & 40 & 4*10 \\ \hline 5 & 75 & 5 * 15 \\ \hline 6 & 126 & 6 * 21\\ \end{array} Focusing on the third column now, I can...
8. ### Comparing sorting algorithms -- Insertion Sort vs. Merge Sort

The answer says insertion sort runs faster when we're sorting less than 43 items. I agree but with the condition that the first item will not be faster. Why does the answer not mention this? Is it because it is insignificantly faster?
9. ### Can anyone explain the following distribution to me?

Apparently the initial distribution for this problem, P_0 = ( 0 0 1 0 0 0 0 0 ) but I do not understand why there are 8 entries?
10. ### Uniform distribution and standard deviation

ended up fixing it, and got the same answer >.> damn I hate algebra
11. ### Uniform distribution and standard deviation

+(3/2) standard deviations from the mean = \frac {a+b}{12} + \frac{\sqrt3}{4} (b-a) -(3/2) standard deviations from the mean = \frac {a+b}{12} - \frac{\sqrt3}{4} (b-a) \frac {1}{b-a} \int_a^{\frac {a+b}{12} - \frac{\sqrt3}{4} (b-a)} dx = m_1= \frac {(-11+3\sqrt3)a + (1-3\sqrt3)b}{12(b-a)}...
12. ### Gamma distribution problem

I answered this question:" b)Given that the system failed during the first 2 years, what is the probability that it failed due to the failure of component B (but not component A)? " Using: P{before 2 years A doesnt fail but B fails} = .6147 divided by: P{system does fail before 2 years} =...
13. ### Gamma distribution problem

Hmm I seem to have gotten the right answer now, which is .6147/.938 Ray I don't think I wrote α=3.46 anywhere mate??
14. ### Gamma distribution problem

My book never mentions Erlang. I understand the third paragraph. What I understand about Gamma distributions: When a procedure consists of α amount of steps and each step takes an exponential amount of time λ, then the total time has a gamma distribution. What I think I did wrong in this...
15. ### Gamma distribution problem

Sorry most of my threads from this course have been in this forum so I thought it would fit. And yes, I do mean to use 'alpha' but I had trouble finding it :/
16. ### Gamma distribution problem

I'm lost. First one was easy to calculate, second one is harder. I have: P{a fails before 2 yrs} = .323325 P{b fails before 2 yrds} = .90844 P{system doesnt fail for 2 years or longer} = .062 P{system does fail before 2 years} = .938 P{A and B fail before 2 yrs} = .29372 P{before 2 years A...
17. ### How many nodes of each degree are there in this graph?

So do I just plug and chug to find out? It seems like 4 of degree 5 and 2 of degree 2 meets the requirements?
18. ### How many nodes of each degree are there in this graph?

there must be an even number of vertices of odd degree, and from the handshake theorem, 2m = 2(12) = 24 the only way we can get this from 6 vertices using 2 and 5 is: 4 vertices of degree 5, 2 vertices of degree 2 does this seem correct??
19. ### Volumes in different dimensions

oh wasn't a hw question, was just wondering myself. I appreciate it though! Also, I use to be able to mark my thread as solved with the old layout. Where is the button on this new one??
20. ### Volumes in different dimensions

I would assume that it has some area even if it is really really small. But I guess a line implies that the left and right boundaries are going to the middle an infinite amount, so it has area =0? does anyone get what I mean?
21. ### Trying to understand transitive relations

thanks for the reply. I can't figure this new design out at all, not sure where the "answered" button is
22. ### Trying to understand transitive relations

Obviously R is not transitive because it doesn't contain (2,2). But does it need to contain both (2,2) and (4,4) to be considered transitive?
23. ### Where is my logic wrong (lottery problem)

Nice! this problem is actually from a discrete math book, and I'm taking a probability course right now, and we haven't learned about hypergeometric distribution surprisingly.
24. ### Where is my logic wrong (lottery problem)

Hmm gotcha. So because the probability of success is not the same each time, this can't be a bernouli trial.
25. ### Where is my logic wrong (lottery problem)

I don't understand why I can't answer this question as a bernuli trial. There are 6 possible correct integers out of 40, and 34 incorrect integers out of 40. I'd assume it would look like this: (6c1)(6/40)(34/40)^5 I guess, it's because when you choose and incorrect or correct integer, the...
26. ### Are (X+Y) and (X-Y) independent?

Hmm interesting. Didn't see it from that perspective!
27. ### Are (X+Y) and (X-Y) independent?

Ahh sorry, meant to write: x-y: \begin{array}{|c|c|c|c|} \hline x-y & -1 & 0 & 1 \\ \hline p(x-y) & .2 & .6 & .2 \\ \hline \end{array} The probabilities add up to 1 so I think its correct? Does this seem right to you?
28. ### Are (X+Y) and (X-Y) independent?

Gahh I'm a moron. I think this is what it will be: x+y: \begin{array}{|c|c|c|c|} \hline x+y & 0 & 1 & 2 \\ \hline p(x+y) & .5 & .4 & .1 \\ \hline \end{array} x-y: \begin{array}{|c|c|c|c|} \hline x+y & -1 & 0 & 1 \\ \hline p(x+y) & .6 & .4 & 0 \\ \hline \end{array} does this seem right now
29. ### Are (X+Y) and (X-Y) independent?

I see. So the table for X-Y will be: for x+y \begin{array}{|c|c|c|c|} \hline x-y & -1 & 0 & 1 \\ \hline p(x-y) & .2 & .6 & .2 \\ \hline \end{array}
30. ### Are (X+Y) and (X-Y) independent?

Hmm I think what I was doing wrong is computing X+Y and X-Y from the marginal distribution, when I should be computing it from the joint distribution so for :x+y \begin{array}{|c|c|c|c|} \hline x+y & 0 & 1 & 2 \\ \hline p(x+y) & .5 & .4 & .1 \\ \hline \end{array} not for x+y...