Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > A C program

Reply
Thread Tools

A C program

 
 
tom st denis
Guest
Posts: n/a
 
      10-30-2012
On Oct 30, 12:13*pm, "BartC" <(E-Mail Removed)> wrote:
> "tom st denis" <(E-Mail Removed)> wrote in messagenews:(E-Mail Removed)...
>
> > This is the equivalent of a math major asking us to help
> > them solve the matrix

>
> > [ 2 1 ]
> > [ 1 1 ]

>
> What's the answer?


R1-R2 and then R2-R1.

So suppose you had the linear system

[2 1][3]
[1 1][2]

Then you'd have

[1 0][1]
[1 1][2]

And

[1 0][1]
[0 1][1]

So x = 1 and y = 1 in this linear system.

MAGIC!
 
Reply With Quote
 
 
 
 
James Kuyper
Guest
Posts: n/a
 
      10-30-2012
On 10/30/2012 12:38 PM, tom st denis wrote:
> On Oct 30, 12:13�pm, "BartC" <(E-Mail Removed)> wrote:
>> "tom st denis" <(E-Mail Removed)> wrote in messagenews:(E-Mail Removed)...
>>
>>> This is the equivalent of a math major asking us to help
>>> them solve the matrix

>>
>>> [ 2 1 ]
>>> [ 1 1 ]

>>
>> What's the answer?

>
> R1-R2 and then R2-R1.


You haven't defined what R1 and R2 refer to, nor what those expressions
mean.

> So suppose you had the linear system
>
> [2 1][3]
> [1 1][2]
>
> Then you'd have
>
> [1 0][1]
> [1 1][2]
>
> And
>
> [1 0][1]
> [0 1][1]
>
> So x = 1 and y = 1 in this linear system.


Nor have you defined what x and y refer to.

Your original statement of the problem lacked sufficient detail to make
"solve" an applicable verb. There was sufficient information to use
"invert", instead. If you had added some variables, and asked to solve
for the values of those variables, for example:

"Solve
| 2 1 | |x| = |a|
| 1 1 | |y| |b|

For x and y in terms of a and b"

that would also have been a meaningful question, with the answer x=a-b,
y=2b-a.
--
James Kuyper
 
Reply With Quote
 
 
 
 
Eric Sosman
Guest
Posts: n/a
 
      10-30-2012
On 10/30/2012 12:12 PM, BartC wrote:
> "tom st denis" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> This is the equivalent of a math major asking us to help
>> them solve the matrix
>>
>> [ 2 1 ]
>> [ 1 1 ]

>
> What's the answer?


42.

--
Eric Sosman
http://www.velocityreviews.com/forums/(E-Mail Removed)d
 
Reply With Quote
 
Joe Pfeiffer
Guest
Posts: n/a
 
      10-30-2012
tom st denis <(E-Mail Removed)> writes:

> On Oct 23, 11:54*am, Nikhil Joshi
> <(E-Mail Removed)> wrote:
>> write a program to calculate decimal number from binary number?

>
> I'mma gonna go beyond what the other people wrote and just say this.
>
> Drop out of whatever program you are in now. If this sort of program
> stumps you you have no business studying computer science nor software
> development.


This strikes me as too harsh. This is the sort of thing that will
challenge a freshman (and maybe even a sophomore) the first time they
see it; he does need to be told to do his own homework (and has been);
he only needs to change majors if he doesn't get better.
 
Reply With Quote
 
tom st denis
Guest
Posts: n/a
 
      10-30-2012
On Oct 30, 12:57*pm, James Kuyper <(E-Mail Removed)> wrote:
> On 10/30/2012 12:38 PM, tom st denis wrote:
>
> > On Oct 30, 12:13 pm, "BartC" <(E-Mail Removed)> wrote:
> >> "tom st denis" <(E-Mail Removed)> wrote in messagenews:(E-Mail Removed)...

>
> >>> This is the equivalent of a math major asking us to help
> >>> them solve the matrix

>
> >>> [ 2 1 ]
> >>> [ 1 1 ]

>
> >> What's the answer?

>
> > R1-R2 and then R2-R1.

>
> You haven't defined what R1 and R2 refer to, nor what those expressions
> mean.


Row 1 and Row 2 ... are you really this dense?

> > So x = 1 and y = 1 in this linear system.

>
> Nor have you defined what x and y refer to.


[2x 1y][3]
[1x 1y][2]

Whatever, you're missing the point. Usually if I say "produce a
solution for this matrix" it means the program [or steps] required to
reduce it to REF. Then when you plug in variables in your column
matrix you need only run the program and voila your solution.

For instance, this is used in Karatsuba and Toom-Cook multiplication.
You end up with a constant matrix but variable column matrix to attach
to it. So the way you solve the system NEVER changes and you can
optimize it thusly.

Tom
 
Reply With Quote
 
Ben Bacarisse
Guest
Posts: n/a
 
      10-30-2012
tom st denis <(E-Mail Removed)> writes:

> On Oct 30, 11:42*am, Ben Bacarisse <(E-Mail Removed)> wrote:
>> tom st denis <(E-Mail Removed)> writes:
>>
>> > On Oct 23, 11:54*am, Nikhil Joshi
>> > <(E-Mail Removed)> wrote:
>> >> write a program to calculate decimal number from binary number?

>>
>> > I'mma gonna go beyond what the other people wrote and just say this.

>>
>> > Drop out of whatever program you are in now. *If this sort of program
>> > stumps you you have no business studying computer science nor software
>> > development. *This is the equivalent of a math major asking us to help
>> > them solve the matrix

>>
>> I may have missed some of this thread, but how do you know the OP is a
>> CS major? *I was quite good at academic CS, but there was a time when I
>> did not know how to do this.

>
> This is clearly a homework question of some sort given the lack of
> details other than a fairly obvious problem statement that came from a
> lab somewhere.


Yes it is. I don't see how that relates to my message.

--
Ben.
 
Reply With Quote
 
tom st denis
Guest
Posts: n/a
 
      10-30-2012
On Oct 30, 1:15*pm, Joe Pfeiffer <(E-Mail Removed)> wrote:
> tom st denis <(E-Mail Removed)> writes:
>
> > On Oct 23, 11:54*am, Nikhil Joshi
> > <(E-Mail Removed)> wrote:
> >> write a program to calculate decimal number from binary number?

>
> > I'mma gonna go beyond what the other people wrote and just say this.

>
> > Drop out of whatever program you are in now. *If this sort of program
> > stumps you you have no business studying computer science nor software
> > development.

>
> This strikes me as too harsh. *This is the sort of thing that will
> challenge a freshman (and maybe even a sophomore) the first time they
> see it; he does need to be told to do his own homework (and has been);
> he only needs to change majors if he doesn't get better.


I think it boils down to a complete and utter lack of intuition and
drive for knowledge. Likely the person is looking for the easiest
cheap ride through to a diploma so they can then waste peoples time as
a completely worthless software developer.

I could have solved this problem when I was 8 years old. So in
effect, this guy has less intuition about software and computer
science than a C average 8 year old from a small town in Ontario
Canada. That's not saying much for their worth as a student let alone
an eventual professional.
 
Reply With Quote
 
tom st denis
Guest
Posts: n/a
 
      10-30-2012
On Oct 30, 1:28*pm, Ben Bacarisse <(E-Mail Removed)> wrote:
> tom st denis <(E-Mail Removed)> writes:
>
>
>
>
>
>
>
>
>
> > On Oct 30, 11:42*am, Ben Bacarisse <(E-Mail Removed)> wrote:
> >> tom st denis <(E-Mail Removed)> writes:

>
> >> > On Oct 23, 11:54*am, Nikhil Joshi
> >> > <(E-Mail Removed)> wrote:
> >> >> write a program to calculate decimal number from binary number?

>
> >> > I'mma gonna go beyond what the other people wrote and just say this.

>
> >> > Drop out of whatever program you are in now. *If this sort of program
> >> > stumps you you have no business studying computer science nor software
> >> > development. *This is the equivalent of a math major asking us to help
> >> > them solve the matrix

>
> >> I may have missed some of this thread, but how do you know the OP is a
> >> CS major? *I was quite good at academic CS, but there was a time when I
> >> did not know how to do this.

>
> > This is clearly a homework question of some sort given the lack of
> > details other than a fairly obvious problem statement that came from a
> > lab somewhere.

>
> Yes it is. *I don't see how that relates to my message.


Even if the problem were challenging [which I maintain it is not] the
very lack of effort on their part should be a sufficient strike
against their character.

Tom
 
Reply With Quote
 
Ben Bacarisse
Guest
Posts: n/a
 
      10-30-2012
tom st denis <(E-Mail Removed)> writes:

> On Oct 30, 1:15*pm, Joe Pfeiffer <(E-Mail Removed)> wrote:
>> tom st denis <(E-Mail Removed)> writes:
>>
>> > On Oct 23, 11:54*am, Nikhil Joshi
>> > <(E-Mail Removed)> wrote:
>> >> write a program to calculate decimal number from binary number?

>>
>> > I'mma gonna go beyond what the other people wrote and just say this.

>>
>> > Drop out of whatever program you are in now. *If this sort of program
>> > stumps you you have no business studying computer science nor software
>> > development.

>>
>> This strikes me as too harsh. *This is the sort of thing that will
>> challenge a freshman (and maybe even a sophomore) the first time they
>> see it; he does need to be told to do his own homework (and has been);
>> he only needs to change majors if he doesn't get better.

>
> I think it boils down to a complete and utter lack of intuition and
> drive for knowledge. Likely the person is looking for the easiest
> cheap ride through to a diploma so they can then waste peoples time as
> a completely worthless software developer.
>
> I could have solved this problem when I was 8 years old. So in
> effect, this guy has less intuition about software and computer
> science than a C average 8 year old from a small town in Ontario
> Canada. That's not saying much for their worth as a student let alone
> an eventual professional.


Using yourself as an example is wrong unless you consider yourself just
about the least talented programmer who ever benefited from studying
programing. I suspect you had an average or above average talent for
programming, which means that there are thousands and thousands of less
talented programmers who, every year, study programming a benefited form
it.

--
Ben.
 
Reply With Quote
 
tom st denis
Guest
Posts: n/a
 
      10-30-2012
On Oct 30, 1:42*pm, Ben Bacarisse <(E-Mail Removed)> wrote:
> Using yourself as an example is wrong unless you consider yourself just
> about the least talented programmer who ever benefited from studying
> programing. *I suspect you had an average or above average talent for
> programming, which means that there are thousands and thousands of less
> talented programmers who, every year, study programming a benefited form
> it.


This guy isn't creating a complicated data compression scheme or
writing a schedule for a pre-emptive OS. It's converting binary to
decimal. It's about as basic as it gets. If this sort of problem
challenges him/her so much that they can't even post their [failed]
attempt at solving it ... they really need to think hard about the
industry they're in.

Worse, if the guy didn't even bother trying and is just looking for a
free ride they should do everyone a favour and step down. Leave room
in the programme for people who actually want to try.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to javac a java program w/ another java program which is w/o a main method cjeffwang@yahoo.com Java 1 10-31-2005 04:25 AM
System program/ Application program ?? Parvsandhu Java 2 07-11-2005 09:08 AM
how to convert a java program to an exe program ola Java 3 02-16-2004 09:42 AM
Calling Java program in another Java program Rey Java 4 12-12-2003 10:18 PM
passing data between Java program and C program--help pipi Java 1 07-21-2003 05:02 AM



Advertisments