472,993 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

largest no

how can i pick up largest no from 5 rows by 5 column matrix????

Jun 6 '07 #1
38 2380
<be**************@yahoo.co.inschrieb im Newsbeitrag
news:11**********************@x35g2000prf.googlegr oups.com...
how can i pick up largest no from 5 rows by 5 column matrix????
By copmaring the first with the send, then the larted of that comparisn with
the 3rd, the larger of that with the 4th and so on until the 25th

Bye, Jojo
Jun 6 '07 #2
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????
Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.

Jun 6 '07 #3
ma**********@pobox.com said:
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
>how can i pick up largest no from 5 rows by 5 column matrix????

Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.
I'm sure we can do better than O(c log c + r log r). Perhaps we should
specify a particular sort. That can get us right up to O(c^2 + r^2)
without any major effort. But can anyone find an exponential-time
algorithm?

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Jun 6 '07 #4
On 6 Jun, 11:29, Richard Heathfield <r...@see.sig.invalidwrote:
mark_blue...@pobox.com said:
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????
Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.

I'm sure we can do better than O(c log c + r log r). Perhaps we should
specify a particular sort. That can get us right up to O(c^2 + r^2)
without any major effort. But can anyone find an exponential-time
algorithm?
There's a big problem here, though - how can we sort anything when we
don't know how to tell whether one thing is larger than another?

Jun 6 '07 #5
<ma**********@pobox.comschrieb im Newsbeitrag
news:11*********************@o5g2000hsb.googlegrou ps.com...
On 6 Jun, 11:29, Richard Heathfield <r...@see.sig.invalidwrote:
> mark_blue...@pobox.com said:
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????
Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.

I'm sure we can do better than O(c log c + r log r). Perhaps we should
specify a particular sort. That can get us right up to O(c^2 + r^2)
without any major effort. But can anyone find an exponential-time
algorithm?

There's a big problem here, though - how can we sort anything when we
don't know how to tell whether one thing is larger than another?
Hmm, the OP talked abut 'no' wich I assume to mean 'number', so it probably
is some integral or floating point number, which are fairly easy to find the
larger.

Bye, Jojo
Jun 6 '07 #6
On 6 Jun, 12:25, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
<mark_blue...@pobox.comschrieb im Newsbeitragnews:11*********************@o5g2000hsb .googlegroups.com...
On 6 Jun, 11:29, Richard Heathfield <r...@see.sig.invalidwrote:
mark_blue...@pobox.com said:
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????
Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.
I'm sure we can do better than O(c log c + r log r). Perhaps we should
specify a particular sort. That can get us right up to O(c^2 + r^2)
without any major effort. But can anyone find an exponential-time
algorithm?
There's a big problem here, though - how can we sort anything when we
don't know how to tell whether one thing is larger than another?

Hmm, the OP talked abut 'no' wich I assume to mean 'number', so it probably
is some integral or floating point number, which are fairly easy to find the
larger.
Finding the largest value in some set is a trivial extension of
finding which of two values is the larger - if the OP wanted us to
write code to do the former, it implies they probably can't do the
latter...
Jun 6 '07 #7
<ma**********@pobox.comschrieb im Newsbeitrag
news:11*********************@p47g2000hsd.googlegro ups.com...
On 6 Jun, 12:25, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
><mark_blue...@pobox.comschrieb im
Newsbeitragnews:11*********************@o5g2000hs b.googlegroups.com...
On 6 Jun, 11:29, Richard Heathfield <r...@see.sig.invalidwrote:
mark_blue...@pobox.com said:
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????
Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.
>I'm sure we can do better than O(c log c + r log r). Perhaps we should
specify a particular sort. That can get us right up to O(c^2 + r^2)
without any major effort. But can anyone find an exponential-time
algorithm?
There's a big problem here, though - how can we sort anything when we
don't know how to tell whether one thing is larger than another?

Hmm, the OP talked abut 'no' wich I assume to mean 'number', so it
probably
is some integral or floating point number, which are fairly easy to find
the
larger.

Finding the largest value in some set is a trivial extension of
finding which of two values is the larger - if the OP wanted us to
write code to do the former, it implies they probably can't do the
latter...
To me it sounds like a homework assignment...
Jun 6 '07 #8
Joachim Schmitz wrote:
<ma**********@pobox.comschrieb im Newsbeitrag
.... snip ...
>>
Finding the largest value in some set is a trivial extension of
finding which of two values is the larger - if the OP wanted us
to write code to do the former, it implies they probably can't
do the latter...

To me it sounds like a homework assignment...
No! I can't imagine a student trying to pull such a scurvy trick.
Couldn't possibly be true!

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

Jun 6 '07 #9
ma**********@pobox.com wrote:
Richard Heathfield <r...@see.sig.invalidwrote:
> mark_blue...@pobox.com said:
>>On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:

how can i pick up largest no from 5 rows by 5 column matrix????
>>Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.

I'm sure we can do better than O(c log c + r log r). Perhaps we
should specify a particular sort. That can get us right up to
O(c^2 + r^2) without any major effort. But can anyone find an
exponential-time algorithm?

There's a big problem here, though - how can we sort anything when
we don't know how to tell whether one thing is larger than another?
You apparantly totally missed the humor involved in RH's post.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

Jun 6 '07 #10
"CBFalconer" <cb********@yahoo.comschrieb im Newsbeitrag
news:46***************@yahoo.com...
ma**********@pobox.com wrote:
>Richard Heathfield <r...@see.sig.invalidwrote:
>> mark_blue...@pobox.com said:
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:

how can i pick up largest no from 5 rows by 5 column matrix????

Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.

I'm sure we can do better than O(c log c + r log r). Perhaps we
should specify a particular sort. That can get us right up to
O(c^2 + r^2) without any major effort. But can anyone find an
exponential-time algorithm?

There's a big problem here, though - how can we sort anything when
we don't know how to tell whether one thing is larger than another?

You apparantly totally missed the humor involved in RH's post.
Me too I must admit. Isn't that what smileys have been invented for?

Bye, Jojo
Jun 6 '07 #11
Richard Heathfield <rj*@see.sig.invalidwrites:
ma**********@pobox.com said:
>On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
>>how can i pick up largest no from 5 rows by 5 column matrix????

Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.

I'm sure we can do better than O(c log c + r log r). Perhaps we should
specify a particular sort. That can get us right up to O(c^2 + r^2)
without any major effort. But can anyone find an exponential-time
algorithm?
Google "permutation sort".

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 6 '07 #12
On 06/06/2007 18:29, Joachim Schmitz wrote:
"CBFalconer" <cb********@yahoo.comschrieb im Newsbeitrag
news:46***************@yahoo.com...
>ma**********@pobox.com wrote:
>>Richard Heathfield <r...@see.sig.invalidwrote:
mark_blue...@pobox.com said:
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
>
>how can i pick up largest no from 5 rows by 5 column matrix????

Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.

I'm sure we can do better than O(c log c + r log r). Perhaps we
should specify a particular sort. That can get us right up to
O(c^2 + r^2) without any major effort. But can anyone find an
exponential-time algorithm?

There's a big problem here, though - how can we sort anything when
we don't know how to tell whether one thing is larger than another?

You apparantly totally missed the humor involved in RH's post.
Me too I must admit. Isn't that what smileys have been invented for?
A smiley would ruin the joke considerably, I must say.

--
Denis Kasak
Jun 6 '07 #13
Richard Heathfield wrote:
ma**********@pobox.com said:
>On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
>>how can i pick up largest no from 5 rows by 5 column matrix????
I'm sure we can do better than O(c log c + r log r). Perhaps we should
specify a particular sort. That can get us right up to O(c^2 + r^2)
without any major effort. But can anyone find an exponential-time
algorithm?
Arrgh.. exponential-time??! The worst sorting algorithms I know, are
O(N^2). :-/

I can't remember Knuth or Sedgewick, discussing anything worse than that.

Give a hint please..

--
Tor <torust [at] online [dot] no>

Jun 6 '07 #14
Tor Rustad said:
Richard Heathfield wrote:
> ma**********@pobox.com said:
>>On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????
>I'm sure we can do better than O(c log c + r log r). Perhaps we
should specify a particular sort. That can get us right up to O(c^2 +
r^2) without any major effort. But can anyone find an
exponential-time algorithm?

Arrgh.. exponential-time??! The worst sorting algorithms I know, are
O(N^2). :-/

I can't remember Knuth or Sedgewick, discussing anything worse than
that.

Give a hint please..
Well, let's see now...

while not sorted
exchange two elements at random
endwhile

That would do it, I think.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Jun 6 '07 #15
Keith Thompson <ks***@mib.orgwrites:
Richard Heathfield <rj*@see.sig.invalidwrites:
> ma**********@pobox.com said:
>>On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????

Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.

I'm sure we can do better than O(c log c + r log r). Perhaps we should
specify a particular sort. That can get us right up to O(c^2 + r^2)
without any major effort. But can anyone find an exponential-time
algorithm?

Google "permutation sort".
Sorry, permutation sort isn't exponential-time. (It's worse.)

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 7 '07 #16
be**************@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????
No matrices in C, sorry. We do have arrays though. Consider..

int arr[5][5];

Does this satisfy your description of a matrix?

The arr array has 25 elements. We can find the largest of them by simply
tripping through the array comparing 'this' one to the previously larger
one. The position of the largest element in the array might also be of
interest. Consider..

int i, j, r, c, max = 0;

for (i = 0; i < 5; ++i)
for (j = 0; j < 5; ++j)
if (arr[i][j] max) {
max = arr[i][j];
r = i, c = j;
}

When this finishes, max will hold the largest int and r and c will tell
you where it is. And very quickly.

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Jun 7 '07 #17
Richard Heathfield <rj*@see.sig.invalidwrites:
Tor Rustad said:
>Richard Heathfield wrote:
>> ma**********@pobox.com said:
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????
>>I'm sure we can do better than O(c log c + r log r). Perhaps we
should specify a particular sort. That can get us right up to O(c^2 +
r^2) without any major effort. But can anyone find an
exponential-time algorithm?

Arrgh.. exponential-time??! The worst sorting algorithms I know, are
O(N^2). :-/

I can't remember Knuth or Sedgewick, discussing anything worse than
that.

Give a hint please..

Well, let's see now...

while not sorted
exchange two elements at random
endwhile

That would do it, I think.
If the exchanges are truly random, that's not guaranteed to terminate,
so it doesn't qualify as an algorithm.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 7 '07 #18
Tor Rustad wrote:
Richard Heathfield wrote:
>ma**********@pobox.com said:
>>On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:

how can i pick up largest no from 5 rows by 5 column matrix???
>I'm sure we can do better than O(c log c + r log r). Perhaps we
should specify a particular sort. That can get us right up to
O(c^2 + r^2) without any major effort. But can anyone find an
exponential-time algorithm?

Arrgh.. exponential-time??! The worst sorting algorithms I know,
are O(N^2). :-/

I can't remember Knuth or Sedgewick, discussing anything worse
than that.

Give a hint please..
I don't know the O(), but try simply rearranging the sortee at
random, then check if sorted. If not, repeat.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

Jun 7 '07 #19
Keith Thompson wrote:
Richard Heathfield <rj*@see.sig.invalidwrites:
>Tor Rustad said:
.... snip ...
>>
>>Arrgh.. exponential-time??! The worst sorting algorithms I know,
are O(N^2). :-/

I can't remember Knuth or Sedgewick, discussing anything worse
than that.

Give a hint please..

Well, let's see now...

while not sorted
exchange two elements at random
endwhile

That would do it, I think.

If the exchanges are truly random, that's not guaranteed to
terminate, so it doesn't qualify as an algorithm.
Yes it is, given sufficient time and a really random generator :-)

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

Jun 7 '07 #20
CBFalconer <cb********@yahoo.comwrites:
Keith Thompson wrote:
>Richard Heathfield <rj*@see.sig.invalidwrites:
>>Tor Rustad said:
... snip ...
>>>
Arrgh.. exponential-time??! The worst sorting algorithms I know,
are O(N^2). :-/

I can't remember Knuth or Sedgewick, discussing anything worse
than that.

Give a hint please..

Well, let's see now...

while not sorted
exchange two elements at random
endwhile

That would do it, I think.

If the exchanges are truly random, that's not guaranteed to
terminate, so it doesn't qualify as an algorithm.

Yes it is, given sufficient time and a really random generator :-)
No, it's not. A truly random generator can generate any possible
sequence, including a sequence that causes the code to repeatedly swap
the first two elements forever. The worst-case behavior is that it
never terminates.

It isn't certain to terminate, but it terminates in some finite time
with probability 1. I *think* that's right. In any case, this
stopped being about C some time ago.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 7 '07 #21
On 2007-06-06 20:18:36 -0700, CBFalconer <cb********@yahoo.comsaid:
Keith Thompson wrote:
>Richard Heathfield <rj*@see.sig.invalidwrites:
>>Tor Rustad said:
... snip ...
>>>
Arrgh.. exponential-time??! The worst sorting algorithms I know,
are O(N^2). :-/

I can't remember Knuth or Sedgewick, discussing anything worse
than that.

Give a hint please..

Well, let's see now...

while not sorted
exchange two elements at random
endwhile

That would do it, I think.

If the exchanges are truly random, that's not guaranteed to
terminate, so it doesn't qualify as an algorithm.

Yes it is, given sufficient time and a really random generator :-)
No, given a truly random number generator, the probability that it will
terminate *approaches* 100% as time approaches infinity. However you
never have an absolute guarantee that it will terminate as there is a
non-zero chance that , for instance, the sequence of numbers is nothing
but the number 42 repeated an infinite number of times.
--
Clark S. Cox III
cl*******@gmail.com

Jun 7 '07 #22
On 6 Jun, 17:29, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
"CBFalconer" <cbfalco...@yahoo.comschrieb im Newsbeitragnews:46***************@yahoo.com...
mark_blue...@pobox.com wrote:
Richard Heathfield <r...@see.sig.invalidwrote:
mark_blue...@pobox.com said:
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
>>>how can i pick up largest no from 5 rows by 5 column matrix????
>>Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.
>I'm sure we can do better than O(c log c + r log r). Perhaps we
should specify a particular sort. That can get us right up to
O(c^2 + r^2) without any major effort. But can anyone find an
exponential-time algorithm?
There's a big problem here, though - how can we sort anything when
we don't know how to tell whether one thing is larger than another?
You apparantly totally missed the humor involved in RH's post.
I didn't.
Me too I must admit. Isn't that what smileys have been invented for?
As Denis points out, that would ruin the joke. "Dry" humour and irony
(both rather British) should never be sullied with emoticons.

Jun 7 '07 #23
On 7 Jun, 02:19, Joe Wright <joewwri...@comcast.netwrote:
bele_harshad2...@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????

No matrices in C, sorry. We do have arrays though. Consider..

int arr[5][5];

Does this satisfy your description of a matrix?

The arr array has 25 elements. We can find the largest of them by simply
tripping through the array comparing 'this' one to the previously larger
one. The position of the largest element in the array might also be of
interest. Consider..

int i, j, r, c, max = 0;
Did the problem statement indicate that the numbers were necessarily
positive?
>
for (i = 0; i < 5; ++i)
for (j = 0; j < 5; ++j)
if (arr[i][j] max) {
max = arr[i][j];
r = i, c = j;
}

When this finishes, max will hold the largest int and r and c will tell
you where it is. And very quickly.
<Identity=OriginalPoster>
Thank you for that solution. I got full marks on the assignment. My
instructor was impressed with my progress.

May I post you the next assignment directly?
</Identity>

Jun 7 '07 #24
Keith Thompson said:
Keith Thompson <ks***@mib.orgwrites:
>Richard Heathfield <rj*@see.sig.invalidwrites:
>> ma**********@pobox.com said:
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????

Step 1. Sort the columns of each row into ascending order.
Step 2. Sort the rows into ascending order using the last column as
the key.
Step 3. Pick the last column of the last row.

I'm sure we can do better than O(c log c + r log r). Perhaps we
should specify a particular sort. That can get us right up to O(c^2
+ r^2) without any major effort. But can anyone find an
exponential-time algorithm?

Google "permutation sort".

Sorry, permutation sort isn't exponential-time. (It's worse.)
Worse is okay too.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Jun 7 '07 #25
Keith Thompson said:
Richard Heathfield <rj*@see.sig.invalidwrites:
>Tor Rustad said:
>>Richard Heathfield wrote:
ma**********@pobox.com said:
On 6 Jun, 10:50, bele_harshad2...@yahoo.co.in wrote:
>how can i pick up largest no from 5 rows by 5 column matrix????

I'm sure we can do better than O(c log c + r log r). Perhaps we
should specify a particular sort. That can get us right up to O(c^2
+ r^2) without any major effort. But can anyone find an
exponential-time algorithm?

Arrgh.. exponential-time??! The worst sorting algorithms I know, are
O(N^2). :-/

I can't remember Knuth or Sedgewick, discussing anything worse than
that.

Give a hint please..

Well, let's see now...

while not sorted
exchange two elements at random
endwhile

That would do it, I think.

If the exchanges are truly random, that's not guaranteed to terminate,
so it doesn't qualify as an algorithm.
while not sorted
pick two elements at random
if they are disordered
exchange them
otherwise
find the first two elements that are disordered, and exchange them
end if
endwhile

Not quite as satisfying, but at least it will terminate at some point.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Jun 7 '07 #26
Joachim Schmitz wrote:
"CBFalconer" <cb********@yahoo.comschrieb im Newsbeitrag
>You apparantly totally missed the humor involved in RH's post.
Me too I must admit. Isn't that what smileys have been invented for?
Smileys are a (n ubsubtle) replacement for tone-of-voice and so
should be omitted when wouldn't use the tone-of-voice signal,
such as in written text.

--
"Our future looks secure, but it's all out of our hands." /Man and Machine/
- Magenta

Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England

Jun 7 '07 #27
On Thu, 7 Jun 2007, Chris Dollin wrote:
Joachim Schmitz wrote:
>"CBFalconer" <cb********@yahoo.comschrieb im Newsbeitrag
>>You apparantly totally missed the humor involved in RH's post.
Me too I must admit. Isn't that what smileys have been invented for?

Smileys are a (n ubsubtle) replacement for tone-of-voice and so
should be omitted when wouldn't use the tone-of-voice signal,
such as in written text.
Subtle humours are linguistic puzzles in disguise and so
should be omitted when these off-topic elements are lowering the
signal-to-noise for the newsgroup, such as comp.lang.c.

Tak-Shing
Jun 7 '07 #28
Tak-Shing Chan wrote:
On Thu, 7 Jun 2007, Chris Dollin wrote:
>Joachim Schmitz wrote:
>>"CBFalconer" <cb********@yahoo.comschrieb im Newsbeitrag
>>>You apparantly totally missed the humor involved in RH's post.
Me too I must admit. Isn't that what smileys have been invented for?

Smileys are a (n ubsubtle) replacement for tone-of-voice and so
should be omitted when wouldn't use the tone-of-voice signal,
such as in written text.

Subtle humours are linguistic puzzles in disguise
So is text.
and so
should be omitted when these off-topic elements are lowering the
signal-to-noise for the newsgroup, such as comp.lang.c.
Wouldn't leave much.

Use all the smileys you like -- take my spare ones if you will.

--
"No-one here is exactly what he appears." G'kar, /Babylon 5/

Hewlett-Packard Limited registered no:
registered office: Cain Road, Bracknell, Berks RG12 1HN 690597 England

Jun 7 '07 #29
Chris Dollin said:

<snip>
Use all the smileys you like -- take my spare ones if you will.
He's already pinched all mine. I think he's going for a global monopoly.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Jun 7 '07 #30
On 7 Jun, 11:57, Richard Heathfield <r...@see.sig.invalidwrote:
Chris Dollin said:

<snip>
Use all the smileys you like -- take my spare ones if you will.

He's already pinched all mine. I think he's going for a global monopoly.
Do you recommending declaring those in header files?
Jun 7 '07 #31
ma**********@pobox.com wrote:
On 7 Jun, 11:57, Richard Heathfield <r...@see.sig.invalidwrote:
>Chris Dollin said:

<snip>
Use all the smileys you like -- take my spare ones if you will.

He's already pinched all mine. I think he's going for a global monopoly.

Do you recommending declaring those in header files?
I haven't a clue about whether that's too risky. You might have to
scrabble around -- the history of the world makes it likely -- to
acquire the right careers. Once in a blue moon, some campaign
against smileys might succeed ...

--
"We did not have time to find out everything /A Clash of Cymbals/
we wanted to know." - James Blish

Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England

Jun 7 '07 #32
Chris Dollin said:
ma**********@pobox.com wrote:
>On 7 Jun, 11:57, Richard Heathfield <r...@see.sig.invalidwrote:
>>Chris Dollin said:

<snip>

Use all the smileys you like -- take my spare ones if you will.

He's already pinched all mine. I think he's going for a global
monopoly.

Do you recommending declaring those in header files?

I haven't a clue about whether that's too risky. You might have to
scrabble around -- the history of the world makes it likely -- to
acquire the right careers. Once in a blue moon, some campaign
against smileys might succeed ...
And that will be the end of civilization as we know it, or something
equally trivial.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Jun 7 '07 #33
On 7 Jun, 12:49, Richard Heathfield <r...@see.sig.invalidwrote:
Chris Dollin said:
mark_blue...@pobox.com wrote:
On 7 Jun, 11:57, Richard Heathfield <r...@see.sig.invalidwrote:
Chris Dollin said:
><snip>
Use all the smileys you like -- take my spare ones if you will.
>He's already pinched all mine. I think he's going for a global
monopoly.
Do you recommending declaring those in header files?
I haven't a clue about whether that's too risky. You might have to
scrabble around -- the history of the world makes it likely -- to
acquire the right careers. Once in a blue moon, some campaign
against smileys might succeed ...

And that will be the end of civilization as we know it, or something
equally trivial.
Mornington Crescent!

Jun 7 '07 #34
Tak-Shing Chan wrote:
On Thu, 7 Jun 2007, Chris Dollin wrote:
>Joachim Schmitz wrote:
>>"CBFalconer" <cb********@yahoo.comschrieb im Newsbeitrag
>>>You apparantly totally missed the humor involved in RH's post.

Me too I must admit. Isn't that what smileys have been invented
for?

Smileys are a (n ubsubtle) replacement for tone-of-voice and so
should be omitted when wouldn't use the tone-of-voice signal,
such as in written text.

Subtle humours are linguistic puzzles in disguise and so
should be omitted when these off-topic elements are lowering the
signal-to-noise for the newsgroup, such as comp.lang.c.
Oh come on. Then everyone would go away, and the news-group would
be totally barren, except for those complaining about something or
other.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

Jun 7 '07 #35
be**************@yahoo.co.in wrote:
how can i pick up largest no from 5 rows by 5 column matrix????
Depends on how you measure your 'no's.

If it is by font size, then you will have to
rely on your OS/GUI to determine their sizes,
which is off-topic for this group.

If it is by number of characters, then it
should always be 2. If you allow usage
of foreign versions of 'no', then you will
need to use strlen(), and a dictionary lookup
to select just those words defined to be
'no'.

If you are using some other form of
measurement, please give us a better set of
specifications.

Since this sounds like a homework assignment,
please give us your teachers address to send
the responses to.

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jun 7 '07 #36
Keith Thompson wrote:
CBFalconer <cb********@yahoo.comwrites:
>Keith Thompson wrote:
>>Richard Heathfield <rj*@see.sig.invalidwrites:
Tor Rustad said:
... snip ...
>>>>Arrgh.. exponential-time??! The worst sorting algorithms I know,
are O(N^2). :-/
>
I can't remember Knuth or Sedgewick, discussing anything worse
than that.
>
Give a hint please..
Well, let's see now...

while not sorted
exchange two elements at random
endwhile

That would do it, I think.
If the exchanges are truly random, that's not guaranteed to
terminate, so it doesn't qualify as an algorithm.
Yes it is, given sufficient time and a really random generator :-)

No, it's not. A truly random generator can generate any possible
sequence, including a sequence that causes the code to repeatedly swap
the first two elements forever. The worst-case behavior is that it
never terminates.
Correct.
It isn't certain to terminate, but it terminates in some finite time
with probability 1.
That is a really deep one, but I also beleave it's correct, typically a
topic my brother try to explain when we both are drunk. I never get it.

In any case, this stopped being about C some time ago.
Sure, but if the student (OP) follow this far, he would learn something!

--
Tor <torust [at] online [dot] no>
Jun 7 '07 #37
Tor Rustad <to********@hotmail.comwrote:
Keith Thompson wrote:
CBFalconer <cb********@yahoo.comwrites:
Keith Thompson wrote:
Richard Heathfield <rj*@see.sig.invalidwrites:
while not sorted
exchange two elements at random
endwhile

That would do it, I think.
If the exchanges are truly random, that's not guaranteed to
terminate, so it doesn't qualify as an algorithm.
Yes it is, given sufficient time and a really random generator :-)
No, it's not. A truly random generator can generate any possible
sequence, including a sequence that causes the code to repeatedly swap
the first two elements forever. The worst-case behavior is that it
never terminates.

Correct.
It isn't certain to terminate, but it terminates in some finite time
with probability 1.

That is a really deep one, but I also beleave it's correct, typically a
topic my brother try to explain when we both are drunk. I never get it.
It is guaranteed to terminate in _some_ finite time, but whatever finite
time you choose to wait for it to terminate in, there is a non-zero
possibility that it may terminate in longer than that. Very sloppily
put, it will eventually terminate, but that termination point may be at
T+1, for _all_ finite T. (Even more sloppily put, it must terminate, but
it may do so at T=infinity. Which, in mathematics, is not the same thing
as not terminating at all, at any time.)

Richard
Jun 8 '07 #38

<be**************@yahoo.co.inha scritto nel messaggio
news:11**********************@x35g2000prf.googlegr oups.com...
how can i pick up largest no from 5 rows by 5 column matrix????
Use a variable (which I'll call max) to hold the element in the top
left corner, then loop through rows and columns, and, wherever you
find a number greater than max, assign it to max.
Jun 8 '07 #39

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: news1.on.sympatico.ca | last post by:
what is the literal for the largest character value in java? ie. 111 in binary is representing 7 (4+2+1) <-- this is 3 bit now java is 32 or 64 bit what is the largest character value ? ...
2
by: Keke922 | last post by:
I have to write a program that allows the user to enter a series of integers and -99 when they want to exit the loop. How do I display the largest and smallest number the user entered?
20
by: Rajesh | last post by:
Hello Everybody, Can anybody help me to write a C program for finding the second largest element in an array. without using any sort algo. The array may conatin duplicate elements. The algo...
19
by: ramu | last post by:
Hi, I have, suppose 1000 numbers, in a file. I have to find out 5 largest numbers among them without sorting. Can you please give me an efficient idea to do this? My idea is to put those numbers...
32
by: ramakrishnadeepak | last post by:
HI Everybody, I 've to submit a program on c.Can any one help me plz.........The problem is like this:: Write a program which computes the largest palindrome substring of a string. Input:...
3
by: HEMH6 | last post by:
Who can help solve this problem??? Finding the Largest Value (a) write a function, largest(), that returns the largest value in a signed integer array. The array and its size are passed as...
25
by: Subra | last post by:
Hi, What is the best way to find the 1000 largest numbers from the file having hell lot of entries ? Can you please help me to find out the way ? Do I need to go for B+ trees ?? Please help,...
4
by: sonia.sardana | last post by:
I know how how to retrive the largest & second largest salary. tell me how to retrive the 3,4,5,...............Largest salary. Create table empl(empid int, empname varchar,salary int) insert...
8
crystal2005
by: crystal2005 | last post by:
I am writing a program that receive maximum of 25 line of string each has 20 characters maximum. The program will print the smallest and the largest string. However the following program gives me...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.