Recent content by mohamed el teir
-
M
Finding intersections in a given range ?
assume array of N (N<=100000) elements a1, a2, ... ,an, and you are given range in it L, R where 1<=L<=R<=N, you are required to get number of values in the given range which are divisible by at least one number from a set S which is given also, this set can be any subset of {1,2,...,10}. a fast...- mohamed el teir
- Thread
- Range
- Replies: 1
- Forum: Programming and Computer Science
-
M
Undergrad Simultaneous Solution for Two Modular Equations with Known Integers
let equation 1: x % n1 = 0, equation 2: x % n2 =1, where n1 and n2 are known positive integers, any multiple of n1 will solve eqn1 and any multiple of n2 (and adding 1 to the multiple) will solve eqn2, but is there a short way to simultaneously solve the two equations to find x instead of...- mohamed el teir
- Thread
- Modulus Numbers
- Replies: 1
- Forum: General Math
-
M
Undergrad How to do division in modulus mode ?
for example 100,539/2 in mod 1,000,007. is there a systematic procedure to calculate this ??- mohamed el teir
- Thread
- Division Mode Modulus
- Replies: 1
- Forum: General Math
-
M
Can a Node Have Multiple Parents in Trees?
so what does an unrooted tree exactly mean ?- mohamed el teir
- Post #5
- Forum: Programming and Computer Science
-
M
Can a Node Have Multiple Parents in Trees?
i am not planning now to use this but as a concept i want to know is this right or wrong- mohamed el teir
- Post #3
- Forum: Programming and Computer Science
-
M
Can a Node Have Multiple Parents in Trees?
i know that a node cannot have more than one parent given that these parents have common ancestor (because this is undirected cycle and a tree must have no cycles). but can a node have more than one parent given that these parents don't have common ancestor (which will produce an unrooted tree i...- mohamed el teir
- Thread
- Data Structures Trees
- Replies: 9
- Forum: Programming and Computer Science
-
M
Undergrad What is meant by this notation?
that's right thank you ! i don't know why do they represent probability distributions by this notation- mohamed el teir
- Post #3
- Forum: Set Theory, Logic, Probability, Statistics
-
M
Undergrad What is meant by this notation?
when saying the probability distribution of X is f(x) = (3 x) this is to be like vector notation where 3 is above x but i can't write it like this here. what is meant by this notation ?- mohamed el teir
- Thread
- Notation
- Replies: 9
- Forum: Set Theory, Logic, Probability, Statistics
-
M
How Do Different Approaches to Conditional Probability Affect Problem Solving?
i think I've figured what what was wrong in my thinking about this. for the colored balls example we could normally treat with their tree diagram as follows: because red, green, yellow are the all possible outcomes of this experiment, so we can normally say: probability of both green and red...- mohamed el teir
- Post #7
- Forum: Engineering and Comp Sci Homework Help
-
M
How Do Different Approaches to Conditional Probability Affect Problem Solving?
i may have a conflict in something, regarding this : is P(R∩G) = P(R)P(G\R) + P(G)P(R\G) as a whole, or is it = P(R)P(G\R) = P(G)P(R\G) as if we are adding P(R∩G) to P(R∩G) giving 2P(R∩G) ?- mohamed el teir
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
M
How Do Different Approaches to Conditional Probability Affect Problem Solving?
but can't we say that this = P(M∩W) / P(M) and we already have the intersection and P(M) ? by the way the second part of the question was asking about this ( P(W|M) )- mohamed el teir
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
M
How Do Different Approaches to Conditional Probability Affect Problem Solving?
Homework Statement suppose we have 9 balls : 2 red, 3 green, 4 yellow. and we draw 2 balls without replacement, the probability that one of them is red and the other is green is : P(R)P(G\R)+P(G)P(R\G) = (2/9)(3/8)+(3/9)(2/8) i faced a problem in the textbook which says: the probability that a...- mohamed el teir
- Thread
- Conditional Conditional probability Probability
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
M
Data structure and algorithms time computation?
sorry it is supposed to be i >= n not i < n, regarding the homework thing : i didn't get this topic from college but from this site https://www.cpp.edu/~ftang/courses/CS240/lectures/analysis.htm while i was reading about algorithms. i saw that somethings in it are not right so i made some...- mohamed el teir
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
M
Data structure and algorithms time computation?
Assume the following set of instructions: 1. i = 0 2. if i < n, goto line 6 3. if A [ i ] = = x, goto line 7 4. i++ 5. goto line 2 6. return false 7. return true Assume that line i take Ci time, where Ci is a constant. The worst case total time of running this block of code can be calculated...- mohamed el teir
- Thread
- Algorithms Computation Data Structure Time
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
M
Graduate Is f(x,y,z) = 8xyz for Maximizing Volume in Ellipsoid?
regarding question number 10, we have h = f + λg where g is the constraint (the ellipsoid) and f is the function we need to maximize or minimize (the rectangular parallelpiped volume), now my question : is it right that f is 8xyz ? i mean if we take f to be xyz not 8xyz and solved till we got...- mohamed el teir
- Thread
- Lagrange Lagrange multipliers Method
- Replies: 1
- Forum: Calculus