## Search found 32 matches

Thu Apr 24, 2014 10:21 pm UTC
Forum: Mathematics
Topic: how many ways-married couples
Replies: 7
Views: 2980

### how many ways-married couples

Hello!!!
Could you help me at the following exercise?
With how many ways can we choose a man and a woman that are not married to each other from n married couples?

I thought that it is (n-1)n ,but I am not sure.Can you tell me if it is right?
Sun Jan 26, 2014 3:16 pm UTC
Forum: Computer Science
Topic: show regularity,without the use of a dfa
Replies: 4
Views: 3891

### Re: show regularity,without the use of a dfa

How is regular defined? One definition is: A language is regular :<=> there exists a regular grammar that produces the language Can you find such a grammar? I am facing difficulties,finding a grammar or expession.If the word should be divisible by 5,it would be (1|2|4|5|7|9)*5 ,but what happens whe...
Sun Jan 26, 2014 2:11 pm UTC
Forum: Computer Science
Topic: show regularity,without the use of a dfa
Replies: 4
Views: 3891

### show regularity,without the use of a dfa

Hey!
How can I show ,without the use of a DFA,that the language L={w:w in {1,2,4,5,7,9}*, w as a decimal gets divided completely by 7} is regular?
Tue Jan 14, 2014 10:14 pm UTC
Forum: Computer Science
Topic: operation of PDA!!!
Replies: 2
Views: 2871

### operation of PDA!!!

Hi!!! I want to describe the operation of the PDA for the language {w in {0,1}*: w=0^i 1^j, i != j}. What I have done so far is: For each 0 that is read we push this onto the stack. Then for each 1 that is read, we pop a 0 from the stack. But how can I be sure that the number of 0 is not equal to th...
Mon Dec 16, 2013 7:17 pm UTC
Forum: Computer Science
Topic: Regular Languages
Replies: 8
Views: 4965

### Re: Regular Languages

->If the language L(A) of an automaton A has an infinite number of words,then there are a,m,t ε Σ*,so that |at|<=| Σk| ( Σk:set of the states),and each word am^(i)t,i>=0,belongs to L(A). This is known as the pumping lemma . Actually, that's not quite the pumping lemma (though it appears to be a tru...
Sun Dec 15, 2013 9:44 pm UTC
Forum: Computer Science
Topic: Regular Languages
Replies: 8
Views: 4965

### Re: Regular Languages

You basically have to show that there is a string xyz (amt using your notation) that is in the language, but at least one of the xy i z is not in the language. Since the pumping lemma is true for all regular languages, the language is therefore not regular. Could you explain me further how to do th...
Sun Dec 15, 2013 9:10 am UTC
Forum: Computer Science
Topic: Regular Languages
Replies: 8
Views: 4965

### Re: Regular Languages

->If the language L(A) of an automaton A has an infinite number of words,then there are a,m,t ε Σ*,so that |at|<=| Σk| ( Σk:set of the states),and each word am^(i)t,i>=0,belongs to L(A). This is known as the pumping lemma . Could you tell me how to apply this at the exercise,because I am not famili...
Sun Dec 15, 2013 12:28 am UTC
Forum: Computer Science
Topic: Regular Languages
Replies: 8
Views: 4965

### Regular Languages

Hello!!! :D I hope someone can help me at the following exercise: Show that the following languages are not regular: a) {ww^R: w ε {a,b}*} (where w^R the word w,written backwards) b){ww: w ε {a,b}*} using the following sentence: ->If the language L(A) of an automaton A has an infinite number of word...
Sun Dec 08, 2013 6:00 pm UTC
Forum: Mathematics
Replies: 5
Views: 2257

### Re: Question about differential equations!

You probably made a slight mistake in posing the problem, because as it stands, lim x->oo v=0 and lim x->oo u=oo which means that automatically lim x->oo v 4 /u=0 You might've swapped the -4y' and 4y' or u and v No,I think that u and v are right..I have checked them again...Maybe,I don't have to fi...
Sun Dec 08, 2013 1:56 pm UTC
Forum: Mathematics
Replies: 5
Views: 2257

Hi!! I am looking at some exercises and got stuck at this one: If the graph of the solution u of the differential equation y''-4y'+29y=0 intersects the graph of the solution v of the differential equation y''+4y'+13y=0 at the point (0,0),find u,v so that: (see attachment) I f...
Mon Dec 02, 2013 9:07 pm UTC
Forum: Mathematics
Topic: Numerical Analysis-help
Replies: 4
Views: 1703

### Re: Numerical Analysis-help

From WP the Jacobi method is an algorithm for determining the solutions of a system of linear equations with largest absolute values in each row and column dominated by the diagonal element. ie the diagonal has to be the biggest element in the row and column. Is this condition satisfied by the Hilb...
Sun Dec 01, 2013 11:45 pm UTC
Forum: Mathematics
Topic: Numerical Analysis-help
Replies: 4
Views: 1703

### Re: Numerical Analysis-help

From WP the Jacobi method is an algorithm for determining the solutions of a system of linear equations with largest absolute values in each row and column dominated by the diagonal element. ie the diagonal has to be the biggest element in the row and column. Is this condition satisfied by the Hilb...
Sun Dec 01, 2013 8:35 pm UTC
Forum: Mathematics
Topic: Numerical Analysis-help
Replies: 4
Views: 1703

### Numerical Analysis-help

Hey!! I have a question..Can the Jacobi method be applied for a Hilbert matrix,with dimension>=250..Because,when I do this,I get NaN as result..Has it to do with the method?Or have I done something wrong???
I hope someone can help me.....
Sun Nov 24, 2013 6:56 pm UTC
Forum: Mathematics
Topic: Check result-condition number
Replies: 6
Views: 1892

### Re: Check result-condition number

Ehat does this mean???Is my result wrong??? It means computers are not magic boxes that always give you an answer. They have limits and just like people when you give them larger problems they're more likely to make a mistake, and it is warning you about them. I understand..Thank you for your help :D
Sun Nov 24, 2013 10:44 am UTC
Forum: Mathematics
Topic: Check result-condition number
Replies: 6
Views: 1892

### Re: Check result-condition number

Why is my result so different from yours???? :shock: Did you not notice the little / in the middle? :roll: The only difference is that you got ~5 digits of accuracy and Nathan got the exact result. Oh sorry!!!!!!!I haven't noticed it before. :oops: I have also an other question.Could you tell me wh...
Sun Nov 24, 2013 10:13 am UTC
Forum: Mathematics
Topic: Check result-condition number
Replies: 6
Views: 1892

### Re: Check result-condition number

Why is my result so different from yours????
Sat Nov 23, 2013 10:05 pm UTC
Forum: Mathematics
Topic: Check result-condition number
Replies: 6
Views: 1892

### Check result-condition number

Hi!! Could you tell me what is equal to the condition number of the matrix R,using the infinity norm, if R is a 50x50 tridiagonal matrix with the number 5 at the main diagonal and the number 6 at the first diagonal below this,and also the number 6 at the first diagonal above the main diagonal?? I fo...
Mon Nov 11, 2013 7:48 pm UTC
Forum: Mathematics
Topic: Question bisection method
Replies: 4
Views: 1064

### Re: Question bisection method

I just want to know using the criteria I wrote before if my program should print the first xk where the termination criteria are satisfied...and I wanted to have an example so that I can compare with my results...
Mon Nov 11, 2013 7:06 pm UTC
Forum: Mathematics
Topic: Question bisection method
Replies: 4
Views: 1064

### Re: Question bisection method

Could you give me an example of the results of the bisection method,so that I can check my output??For example if we have the function pow(x,3)+2*pow(x,2)+3,which has to be the output?
Mon Nov 11, 2013 9:45 am UTC
Forum: Mathematics
Topic: Question bisection method
Replies: 4
Views: 1064

### Question bisection method

Hello!!!! I have to implement the bisection method.At each step of this method my code should print the current approximation x_{k} and f( x_{k} ).....The program should end if the number of iterations surpass the maximum number of iterations,or if one or both of these conditions : | x_{k} - x_{k-1}...
Tue Oct 29, 2013 10:58 pm UTC
Forum: Mathematics
Topic: Approximation of pi
Replies: 9
Views: 3028

### Approximation of pi

Hey! I am writing a code in C that finds an approximation of pi,with single and double precision, using the relation the sum Σ{1/k^2, k=1....n}, knowing that pi 2 /6=Σ{1/k^2, k=1....oo}. I used a for loop to calculate the sum s=Σ{1/k^2, k=1....n}. For n=100, when I declared the variables as float I ...
Fri Jun 21, 2013 6:13 pm UTC
Forum: Computer Science
Topic: print a string modified-what's wrong?
Replies: 14
Views: 5999

### Re: print a string modified-what's wrong?

So,at the command *p1=*p2,the address p1 stays unchanged...Or am I wrong???
Fri Jun 21, 2013 5:47 pm UTC
Forum: Computer Science
Topic: print a string modified-what's wrong?
Replies: 14
Views: 5999

### Re: print a string modified-what's wrong?

I had forgotten how it was exactly written at the test,so I had tried to remeber it and write it... but why do we always have 2 repetitions?
Fri Jun 21, 2013 5:30 pm UTC
Forum: Computer Science
Topic: print a string modified-what's wrong?
Replies: 14
Views: 5999

### Re: print a string modified-what's wrong?

I got this program at a test and I haven't understood yet what it does....
Fri Jun 21, 2013 5:29 pm UTC
Forum: Computer Science
Topic: print a string modified-what's wrong?
Replies: 14
Views: 5999

### Re: print a string modified-what's wrong?

I don't know...I got confused right now...at the command while (p1<p2),what do we check????if *p1<*p2 or something else?????
Fri Jun 21, 2013 4:45 pm UTC
Forum: Computer Science
Topic: print a string modified-what's wrong?
Replies: 14
Views: 5999

### Re: print a string modified-what's wrong?

Right now I runned the program,givig as input the string VENICE...Why I got as output the result CINEVE and not CENIVE???
Fri Jun 21, 2013 2:07 pm UTC
Forum: Computer Science
Topic: print a string modified-what's wrong?
Replies: 14
Views: 5999

### Re: print a string modified-what's wrong?

Oh yes,I am sorry...I wanted to decrement p2...Thank you very much!!!!!
Fri Jun 21, 2013 11:37 am UTC
Forum: Computer Science
Topic: print a string modified-what's wrong?
Replies: 14
Views: 5999

### print a string modified-what's wrong?

Hey guys???I hope you can help me to find my error at a code.. This is the code I have written: #include <stdio.h> #include <string.h> void func(char *p1,char *p2){ char ch; while (p1<p2){ ch=*p1; *p1=*p2; *p2=ch; p1++; p1--; } } int main() { char a[8]; printf("Give a string:\n"); gets(a);...
Sat May 25, 2013 3:11 pm UTC
Forum: Computer Science
Topic: Declaration of value
Replies: 5
Views: 7196

### Declaration of value

Hi!!!I have a question...
I want to use the value "age" at a program I have to write in C....
How must the value "age" be declared????As INT or FLOAT???Thank you
Mon May 06, 2013 5:11 pm UTC
Forum: Mathematics
Topic: Mean value!!!
Replies: 12
Views: 3016

### Re: Mean value!!!

Ok,I while make a try...Thank you very much!!!
Mon May 06, 2013 11:13 am UTC
Forum: Mathematics
Topic: Mean value!!!
Replies: 12
Views: 3016

### Re: Mean value!!!

I write you what I have done until now:
n=1: E=(2c+c/2)/2=5c/4=51c/22*1
n=2: E=(4c+2c+c/4)/4=25c/16=52c/22*2
n=3: E=(14c+3c/2+c/8)/8=125c/64=53c/22*3
etc.
So, playing the game n times, the expected value is E=5nc/22*n=(5/4)nc.
Is this right???
Fri May 03, 2013 10:51 pm UTC
Forum: Mathematics
Topic: Mean value!!!
Replies: 12
Views: 3016

### Mean value!!!

Hi!!!!I hope you can help me at the following exercise: Consider a gamble,with the same possibility to win or to lose.If we win,we double our property,but if we lose we halve our property.Let's consider that we begin with an amount c.Which will be the mean value of our property,if we play n times(in...