Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

panic: kernel segmentation violation. core dumped (only kidding)


computers / comp.os.linux.advocacy / Programming Problem for Programmers (Not Monkeys)

SubjectAuthor
* Programming Problem for Programmers (Not Monkeys)Farley Flud
+* Re: Programming Problem for Programmers (Not Monkeys)Tyrone
|`* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
| `* Re: Programming Problem for Programmers (Not Monkeys)Stéphane CARPENTIER
|  +* Re: Programming Problem for Programmers (Not Monkeys)DFS
|  |`- Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
|  `* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
|   `- Re: Programming Problem for Programmers (Not Monkeys)Stéphane CARPENTIER
+* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
|+* Re: Programming Problem for Programmers (Not Monkeys)Stéphane CARPENTIER
||`* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
|| `* Re: Programming Problem for Programmers (Not Monkeys)rbowman
||  `* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
||   `- Re: Programming Problem for Programmers (Not Monkeys)rbowman
|`* Re: Programming Problem for Programmers (Not Monkeys)Farley Flud
| +- Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
| `- Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
+* Re: Programming Problem for people who know how to search for the answer (was: PTyrone
|`- Re: Programming Problem for people who know how to search for theStéphane CARPENTIER
`* Re: Programming Problem for Programmers (Not Monkeys)DFS
 `* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
  `* Re: Programming Problem for Programmers (Not Monkeys)rbowman
   `* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
    +* Re: Programming Problem for Programmers (Not Monkeys)Lord Master
    |+- Re: Programming Problem for Programmers (Not Monkeys)DFS
    |+* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
    ||+* Re: Programming Problem for Programmers (Not Monkeys)Farley Flud
    |||`* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
    ||| `* Re: Programming Problem for Programmers (Not Monkeys)Farley Flud
    |||  +* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
    |||  |`* Re: Programming Problem for Programmers (Not Monkeys)rbowman
    |||  | `* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
    |||  |  +* Re: Programming Problem for Programmers (Not Monkeys)Joel
    |||  |  |`* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
    |||  |  | `- Re: Programming Problem for Programmers (Not Monkeys)Joel
    |||  |  `- Re: Programming Problem for Programmers (Not Monkeys)rbowman
    |||  `* Re: Programming Problem for Programmers (Not Monkeys)chrisv
    |||   +- Re: Programming Problem for Programmers (Not Monkeys)RabidPedagog
    |||   +- Re: Programming Problem for Programmers (Not Monkeys)RonB
    |||   `* Re: Programming Problem for Programmers (Not Monkeys)DFS
    |||    `* Re: Programming Problem for Programmers (Not Monkeys)RabidPedagog
    |||     `* Re: Programming Problem for Programmers (Not Monkeys)chrisv
    |||      +* Re: Programming Problem for Programmers (Not Monkeys)RonB
    |||      |`* Re: Programming Problem for Programmers (Not Monkeys)RabidPedagog
    |||      | `* Re: Programming Problem for Programmers (Not Monkeys)RonB
    |||      |  `* Re: Programming Problem for Programmers (Not Monkeys)RabidPedagog
    |||      |   +* Re: Programming Problem for Programmers (Not Monkeys)DFS
    |||      |   |`* Re: Programming Problem for Programmers (Not Monkeys)RabidPedagog
    |||      |   | `* Re: Programming Problem for Programmers (Not Monkeys)DFS
    |||      |   |  `* Re: Programming Problem for Programmers (Not Monkeys)RabidPedagog
    |||      |   |   `* Re: Programming Problem for Programmers (Not Monkeys)DFS
    |||      |   |    `- Re: Programming Problem for Programmers (Not Monkeys)RabidPedagog
    |||      |   `- Re: Programming Problem for Programmers (Not Monkeys)RonB
    |||      `- Re: Programming Problem for Programmers (Not Monkeys)DFS
    ||`* Re: Programming Problem for Programmers (Not Monkeys)Lord Master
    || +- Re: Programming Problem for Programmers (Not Monkeys)rbowman
    || +* Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
    || |`* Re: Programming Problem for Programmers (Not Monkeys)rbowman
    || | `- Re: Programming Problem for Programmers (Not Monkeys)Physfitfreak
    || `* Re: Programming Problem for Programmers (Not Monkeys)RabidPedagog
    ||  +- Re: Programming Problem for Programmers (Not Monkeys)chrisv
    ||  +* Re: Programming Problem for Programmers (Not Monkeys)rbowman
    ||  |+* Re: Programming Problem for Programmers (Not Monkeys)RabidPedagog
    ||  ||`* COLA personalities (was: Re: Programming Problem for Programmers (Not Monkeys))vallor
    ||  || +* Re: COLA personalitiesDFS
    ||  || |+* Re: COLA personalitiesStéphane CARPENTIER
    ||  || ||+* Re: COLA personalitiesRonB
    ||  || |||`* Re: COLA personalitiesrbowman
    ||  || ||| `* Re: COLA personalitiesRonB
    ||  || |||  +* Re: COLA personalitiesChris Ahlstrom
    ||  || |||  |+* Re: COLA personalitiesRonB
    ||  || |||  ||+* Re: COLA personalitiesJoel
    ||  || |||  |||`- Re: COLA personalities%
    ||  || |||  ||`* Re: COLA personalitiesChris Ahlstrom
    ||  || |||  || `* Re: COLA personalitiesRonB
    ||  || |||  ||  +- Re: COLA personalitiesRabidPedagog
    ||  || |||  ||  `* Re: COLA personalitiesChris Ahlstrom
    ||  || |||  ||   `* Re: COLA personalitiesrbowman
    ||  || |||  ||    +* Re: COLA personalitiesChris Ahlstrom
    ||  || |||  ||    |`* Re: COLA personalitiesrbowman
    ||  || |||  ||    | `* Re: COLA personalitiesChris Ahlstrom
    ||  || |||  ||    |  `* Re: COLA personalitiesrbowman
    ||  || |||  ||    |   +* Re: COLA personalitiesChris Ahlstrom
    ||  || |||  ||    |   |`- Re: COLA personalitiesrbowman
    ||  || |||  ||    |   `* Re: COLA personalitieschrisv
    ||  || |||  ||    |    +- Re: COLA personalitiesJoel
    ||  || |||  ||    |    `- Re: COLA personalitiesChris Ahlstrom
    ||  || |||  ||    `* Re: COLA personalitiesRabidPedagog
    ||  || |||  ||     +- Re: COLA personalitiesChris Ahlstrom
    ||  || |||  ||     `* Re: COLA personalitiesrbowman
    ||  || |||  ||      +* Re: COLA personalitiesRabidPedagog
    ||  || |||  ||      |`- Re: COLA personalitiesrbowman
    ||  || |||  ||      `- Re: Genesis prefers incest over homosexuality & sodomy.Joel
    ||  || |||  |`* Re: COLA personalitiesrbowman
    ||  || |||  | `* Re: COLA personalitiesChris Ahlstrom
    ||  || |||  |  `* Re: COLA personalitiesrbowman
    ||  || |||  |   `* Re: COLA personalitiesChris Ahlstrom
    ||  || |||  |    `- Re: COLA personalitiesrbowman
    ||  || |||  `* Re: COLA personalitiesrbowman
    ||  || |||   `* Re: COLA personalitiesRonB
    ||  || |||    `* Re: COLA personalitiesrbowman
    ||  || ||+- Re: COLA personalitiesrbowman
    ||  || ||+- Re: COLA personalitiesJoel
    ||  || ||+* Re: COLA personalitiesPhysfitfreak
    ||  || ||`* Re: COLA personalitiesRabidPedagog
    ||  || |`- Re: COLA personalitiesRabidPedagog
    ||  || `- Re: COLA personalities (was: Re: Programming Problem for Programmers (Not MonkeyDiego Garcia
    ||  |`- Re: Programming Problem for Programmers (Not Monkeys)DFS
    ||  `- Re: Programming Problem for Programmers (Not Monkeys)Joel
    |`- Re: Programming Problem for Programmers (Not Monkeys)Stéphane CARPENTIER
    `* Re: Programming Problem for Programmers (Not Monkeys)rbowman

Pages:123456
Programming Problem for Programmers (Not Monkeys)

<17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8218&group=comp.os.linux.advocacy#8218

  copy link   Newsgroups: comp.os.linux.advocacy
From: ff@linux.rocks (Farley Flud)
Subject: Programming Problem for Programmers (Not Monkeys)
Newsgroups: comp.os.linux.advocacy
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Lines: 67
Path: i2pn2.org!i2pn.org!news.hispagatos.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!news.usenetexpress.com!not-for-mail
Date: Sat, 20 Jan 2024 15:57:23 +0000
Nntp-Posting-Date: Sat, 20 Jan 2024 15:57:23 +0000
X-Received-Bytes: 2555
X-Complaints-To: abuse@usenetexpress.com
Organization: UsenetExpress - www.usenetexpress.com
Message-Id: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
 by: Farley Flud - Sat, 20 Jan 2024 15:57 UTC

If you are a REAL PROGRAMMER you will solve this.

If you are a CODE MONKEY you will screech and bang on the
bars until Mamma Microslop throws you a banana.

The Cost of Beer

It was nearing Easter, and a group of students went to a local pub
for a (liquid) lunch. Unfortunately, only one of them had any money.
But this student kindly offered to pay for them all on the condition
that they refunded the money at a later time. During the course of
this "lunch" four rounds were purchased, each consisting of combinations
of bitter, lager, cider and stout. Due to an oversight the generous
student made a record of who had drunk how much of each beer and what
the total cost of each round was, but failed to make a record of how
much a pint of each of the beers was! Fortunately the student knew
all about solving simultaneous equations and realized that it was
possible to calculate the cost of the beers from the information
available.

The available data are summarized in the table below.

********* Need Monospace Font ************

Pints of beer bought

Round Bitter Lager Cider Stout Cost of round
no.

1 3/2 2 5/2 1/2 8.99

2 5/2 1/2 2 5/2 10.46

3 2 5/2 3 1 11.78

4 1 2 0 5/2 7.99

The student set the problem up in matrix form, denoting the costs
of pints of bitter, lager, cider and stout as w, x, y and z
respectively, giving a linear equation system.

The student was aware of the problems that could occur if the
matrix was less than full rank, and checked that the determinant was
indeed non-zero. Thus in full confidence the student proceeded to
calculate the cost of each beer. The results were:

A pint of bitter cost: -3.86

A pint of lager cost: 0.60

A pint of cider cost: 4.58

A pint of stout cost: 4.26

The student was puzzled! On checking the calculations no errors
were found! The charges made by the publican were also correct.

If nobody made any error why does it look like the students were
being paid to drink bitter? What are the correct prices?

Monkey want banana? Then monkey solve problem.

Hey. It's straightforward high-school linear algebra.

Ha, ha, ha, ha, ha, ha, ha!

Re: Programming Problem for Programmers (Not Monkeys)

<tLScndIqD8aC-zH4nZ2dnZfqn_WdnZ2d@supernews.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8229&group=comp.os.linux.advocacy#8229

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!69.80.99.22.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 21 Jan 2024 00:32:31 +0000
From: none@none.none (Tyrone)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
X-No-Archive: Yes
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
User-Agent: Usenapp for MacOS
X-Usenapp: v1.27.2/l - Full License
Message-ID: <tLScndIqD8aC-zH4nZ2dnZfqn_WdnZ2d@supernews.com>
Date: Sun, 21 Jan 2024 00:32:31 +0000
Lines: 23
X-Trace: sv3-vw3xPxV4wGEiRVWBoupDEowNRB8QDEoJejwB8tX7IXd3yg9cKFggqZuz11l6SFs36RM30hC25ulqNY4!gLXsG4BR/kU1ZHj1sTOA5KCDFjxjTjhwvE8Xe3V0bjqJipvkNvqdk3/wmtS2e08RpR4Ic0ec30d6!eRmoighw
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Tyrone - Sun, 21 Jan 2024 00:32 UTC

On Jan 20, 2024 at 10:57:23 AM EST, "Farley Flud" <ff@linux.rocks> wrote:

> If you are a REAL PROGRAMMER you will solve this.
>
> If you are a CODE MONKEY you will screech and bang on the
> bars until Mamma Microslop throws you a banana.
>
> The Cost of Beer

Its really sad - and pathetic - that you still think that copying brain
teasers like this from physicsforums.com is "programming". This was designed
to be solved in Excel. Your imagined super duper Linux Programming Skillz are
not required.

For the curious, there is a very long discussion about this at
<https://www.physicsforums.com/threads/the-price-of-beer-linear-algebra-problem.1048253/>

[Hint: If the price of a pint of beer is £1.99, how much does half a pint
cost?]

Next time, try to come up with a Real World programming problem. AGAIN, there
is SO MUCH MORE to programming than just math and probability brain teasers,
which don't require ANY "computer programming" to solve.

Re: Programming Problem for Programmers (Not Monkeys)

<uohqvu$ngpv$1@solani.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8230&group=comp.os.linux.advocacy#8230

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Physfitfreak@gmail.com (Physfitfreak)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: Sat, 20 Jan 2024 19:11:26 -0600
Message-ID: <uohqvu$ngpv$1@solani.org>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<tLScndIqD8aC-zH4nZ2dnZfqn_WdnZ2d@supernews.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 21 Jan 2024 01:11:27 -0000 (UTC)
Injection-Info: solani.org;
logging-data="770879"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:TvZgP2w14Zpu2X5TsZEz9CYNIdQ=
In-Reply-To: <tLScndIqD8aC-zH4nZ2dnZfqn_WdnZ2d@supernews.com>
Content-Language: en-US
X-User-ID: eJwFwYEBwCAIA7CXQKDUc9DZ/09YUgHH7UQhSyVNXrf+fMid6RbiyM++LCiWVqIZhderG7KPYYp9WG/u4w88pRTv
 by: Physfitfreak - Sun, 21 Jan 2024 01:11 UTC

On 1/20/2024 6:32 PM, Tyrone wrote:
> For the curious, there is a very long discussion about this at
> <https://www.physicsforums.com/threads/the-price-of-beer-linear-algebra-problem.1048253/>

But the post you gave the link for is also by "Diego Garcia"... :) Same
person as Farley. No?

Re: Programming Problem for Programmers (Not Monkeys)

<uoi343$njhp$1@solani.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8231&group=comp.os.linux.advocacy#8231

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!nntp.comgw.net!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Physfitfreak@gmail.com (Physfitfreak)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: Sat, 20 Jan 2024 21:30:10 -0600
Message-ID: <uoi343$njhp$1@solani.org>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 21 Jan 2024 03:30:11 -0000 (UTC)
Injection-Info: solani.org;
logging-data="773689"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:5KZ+A5pPEqQOqehdbdi+pZrH2hQ=
Content-Language: en-US
In-Reply-To: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
X-User-ID: eJwNycEBwCAIA8CVxASEcSya/Uew9z1HWPRieNDlij3VzMq4QAu0VGkv1Bys0X34l0KWl/1xgDheRm3DrX5K8hVL
 by: Physfitfreak - Sun, 21 Jan 2024 03:30 UTC

On 1/20/2024 9:57 AM, Farley Flud wrote:
> If you are a REAL PROGRAMMER you will solve this.
>
> If you are a CODE MONKEY you will screech and bang on the
> bars until Mamma Microslop throws you a banana.
>
> The Cost of Beer
>
> It was nearing Easter, and a group of students went to a local pub
> for a (liquid) lunch. Unfortunately, only one of them had any money.
> But this student kindly offered to pay for them all on the condition
> that they refunded the money at a later time. During the course of
> this "lunch" four rounds were purchased, each consisting of combinations
> of bitter, lager, cider and stout. Due to an oversight the generous
> student made a record of who had drunk how much of each beer and what
> the total cost of each round was, but failed to make a record of how
> much a pint of each of the beers was! Fortunately the student knew
> all about solving simultaneous equations and realized that it was
> possible to calculate the cost of the beers from the information
> available.
>
> The available data are summarized in the table below.
>
> ********* Need Monospace Font ************
>
> Pints of beer bought
>
> Round Bitter Lager Cider Stout Cost of round
> no.
>
> 1 3/2 2 5/2 1/2 8.99
>
> 2 5/2 1/2 2 5/2 10.46
>
> 3 2 5/2 3 1 11.78
>
> 4 1 2 0 5/2 7.99
>
>
> The student set the problem up in matrix form, denoting the costs
> of pints of bitter, lager, cider and stout as w, x, y and z
> respectively, giving a linear equation system.
>
> The student was aware of the problems that could occur if the
> matrix was less than full rank, and checked that the determinant was
> indeed non-zero. Thus in full confidence the student proceeded to
> calculate the cost of each beer. The results were:
>
> A pint of bitter cost: -3.86
>
> A pint of lager cost: 0.60
>
> A pint of cider cost: 4.58
>
> A pint of stout cost: 4.26
>
> The student was puzzled! On checking the calculations no errors
> were found! The charges made by the publican were also correct.
>
> If nobody made any error why does it look like the students were
> being paid to drink bitter? What are the correct prices?
>
> Monkey want banana? Then monkey solve problem.
>
> Hey. It's straightforward high-school linear algebra.
>
> Ha, ha, ha, ha, ha, ha, ha!
>

I'm not familiar with Pub jargon. What do you mean by 5/2 or 3/2 etc?

Re: Programming Problem for people who know how to search for the answer (was: Programming Problem for Programmers (Not Monkeys))

<3pednUbkFOPtMjH4nZ2dnZfqn_adnZ2d@supernews.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8233&group=comp.os.linux.advocacy#8233

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!news.samoylyk.net!3.us.feeder.erje.net!feeder.erje.net!weretis.net!feeder6.news.weretis.net!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 21 Jan 2024 05:45:20 +0000
From: none@none.none (Tyrone)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for people who know how to search for the answer (was: Programming Problem for Programmers (Not Monkeys))
X-No-Archive: Yes
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
User-Agent: Usenapp for MacOS
X-Usenapp: v1.27.2/l - Full License
Message-ID: <3pednUbkFOPtMjH4nZ2dnZfqn_adnZ2d@supernews.com>
Date: Sun, 21 Jan 2024 05:45:20 +0000
Lines: 33
X-Trace: sv3-dHKZJ11ifwAwIK2HjxLhAONs4bSsDrlxIQOh3pgBfoHSr8+Ti2GEjyY+VRR4z1mNh6FpJuzz2eac0Qc!NxaD+qKxMMfz5Qe7d4zye3KiuZDtn22t3c8GQuaTOBp6nkjVmtVRQEL28D2e3ZMz8v53fHLjdBQ4!eNvW0CDv
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Tyrone - Sun, 21 Jan 2024 05:45 UTC

On Jan 20, 2024 at 10:57:23 AM EST, "Farley Flud" <ff@linux.rocks> wrote:

> If you are a REAL PROGRAMMER you will solve this.
>
> If you are a CODE MONKEY you will screech and bang on the
> bars until Mamma Microslop throws you a banana.
>
> The Cost of Beer

The individual costs were:

Pint of Bitter is 1.23
Pint of Lager is 1.44
Pint of Cider is 1.39
Pint of Stout is 1.55

A half pint will be rounded up to the next full penny. So a half pint of
Bitter is 1.23 / 2 = .615 or .62 rounded. Lager is 1.44 / 2 = .72 no rounding
needed. Cider is 1.39 / 2 = .695 rounded to .70. Stout is 1.55 / 2 = .775
rounded to .78.

So round 1 = 1.85 + 2.88 + 3.48 + .78 = 8.99. Rounds 2, 3 and 4 add up using
the same simple method.

If you are going to present "problems" from the internet, you have to
understand that the "problem" has already been solved.

Real programming does not involve coding solutions to problems that have
already been solved. One needs to solve problems unique to the data and
situation in hand.

AGAIN, you are utterly clueless about "programming".

Re: Programming Problem for Programmers (Not Monkeys)

<65acdd2e$0$16327$426a74cc@news.free.fr>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8234&group=comp.os.linux.advocacy#8234

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!news.furie.org.uk!nntp.terraraq.uk!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed3-b.proxad.net!nnrp2-1.free.fr!not-for-mail
Newsgroups: comp.os.linux.advocacy
From: sc@fiat-linux.fr (Stéphane CARPENTIER)
Subject: Re: Programming Problem for Programmers (Not Monkeys)
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<tLScndIqD8aC-zH4nZ2dnZfqn_WdnZ2d@supernews.com> <uohqvu$ngpv$1@solani.org>
Organization: Mulots' Killer
User-Agent: slrn/pre1.0.4-9 (Linux)
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Date: 21 Jan 2024 09:00:30 GMT
Lines: 15
Message-ID: <65acdd2e$0$16327$426a74cc@news.free.fr>
NNTP-Posting-Date: 21 Jan 2024 10:00:30 CET
NNTP-Posting-Host: 78.201.248.7
X-Trace: 1705827630 news-1.free.fr 16327 78.201.248.7:37842
X-Complaints-To: abuse@proxad.net
 by: Stéphane CARPENTIER - Sun, 21 Jan 2024 09:00 UTC

Le 21-01-2024, Physfitfreak <Physfitfreak@gmail.com> a écrit :
> On 1/20/2024 6:32 PM, Tyrone wrote:
>> For the curious, there is a very long discussion about this at
>> <https://www.physicsforums.com/threads/the-price-of-beer-linear-algebra-problem.1048253/>
>
>
> But the post you gave the link for is also by "Diego Garcia"... :) Same
> person as Farley. No?

Yes, and Larry and Nux and some others. He's easy to recognise: he
swears and laughs for no reason half of the time.

--
Si vous avez du temps à perdre :
https://scarpet42.gitlab.io

Re: Programming Problem for Programmers (Not Monkeys)

<65ace107$0$11901$426a74cc@news.free.fr>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8235&group=comp.os.linux.advocacy#8235

  copy link   Newsgroups: comp.os.linux.advocacy
X-Received: by 2002:a05:600c:3847:b0:40e:9ea8:d0b6 with SMTP id s7-20020a05600c384700b0040e9ea8d0b6mr92941wmr.0.1705828615974;
Sun, 21 Jan 2024 01:16:55 -0800 (PST)
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp3-1.free.fr!not-for-mail
Newsgroups: comp.os.linux.advocacy
From: sc@fiat-linux.fr (Stéphane CARPENTIER)
Subject: Re: Programming Problem for Programmers (Not Monkeys)
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<uoi343$njhp$1@solani.org>
Organization: Mulots' Killer
User-Agent: slrn/pre1.0.4-9 (Linux)
Mime-Version: 1.0
Date: 21 Jan 2024 09:16:55 GMT
Lines: 21
Message-ID: <65ace107$0$11901$426a74cc@news.free.fr>
NNTP-Posting-Date: 21 Jan 2024 10:16:55 CET
NNTP-Posting-Host: 78.201.248.7
X-Trace: 1705828615 news-3.free.fr 11901 78.201.248.7:38184
X-Complaints-To: abuse@proxad.net
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Received-Bytes: 1949
 by: Stéphane CARPENTIER - Sun, 21 Jan 2024 09:16 UTC

Le 21-01-2024, Physfitfreak <Physfitfreak@gmail.com> a écrit :
> On 1/20/2024 9:57 AM, Farley Flud wrote:
>> During the course of
>> this "lunch" four rounds were purchased, each consisting of combinations
>> of bitter, lager, cider and stout. Due to an oversight the generous
>> student made a record of who had drunk how much of each beer
>
> I'm not familiar with Pub jargon. What do you mean by 5/2 or 3/2 etc?

I'm not familiar of that use of units neither. I believe, as a pint is
something like half a litter, that means 5/2 consist of 5 pints or 2.5
litters.

For your information, I don't know what a bitter is, but the cider is
not a kind of beer. A beer is done from barley when cider is done from
apple. You could consider sake (the Japanese drink) as a beer even if
it's rarely done. But cider is clearly different, it's more like wine.

--
Si vous avez du temps à perdre :
https://scarpet42.gitlab.io

Re: Programming Problem for people who know how to search for the answer (was: Programming Problem for Programmers (Not Monkeys))

<65ace1a3$0$11901$426a74cc@news.free.fr>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8236&group=comp.os.linux.advocacy#8236

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!cleanfeed2-a.proxad.net!nnrp3-1.free.fr!not-for-mail
Newsgroups: comp.os.linux.advocacy
From: sc@fiat-linux.fr (Stéphane CARPENTIER)
Subject: Re: Programming Problem for people who know how to search for the
answer (was: Programming Problem for Programmers (Not Monkeys))
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<3pednUbkFOPtMjH4nZ2dnZfqn_adnZ2d@supernews.com>
Organization: Mulots' Killer
User-Agent: slrn/pre1.0.4-9 (Linux)
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Date: 21 Jan 2024 09:19:31 GMT
Lines: 10
Message-ID: <65ace1a3$0$11901$426a74cc@news.free.fr>
NNTP-Posting-Date: 21 Jan 2024 10:19:31 CET
NNTP-Posting-Host: 78.201.248.7
X-Trace: 1705828771 news-3.free.fr 11901 78.201.248.7:38184
X-Complaints-To: abuse@proxad.net
 by: Stéphane CARPENTIER - Sun, 21 Jan 2024 09:19 UTC

Le 21-01-2024, Tyrone <none@none.none> a écrit :
>
> Real programming does not involve coding solutions to problems that have
> already been solved.

In fact, it can be a good idea to learn. But not for a full time work.

--
Si vous avez du temps à perdre :
https://scarpet42.gitlab.io

Re: Programming Problem for Programmers (Not Monkeys)

<kKbrN.44845$Iswd.2334@fx05.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8244&group=comp.os.linux.advocacy#8244

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!45.76.7.193.MISMATCH!3.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx05.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Betterbird (Windows)
From: nospam@dfs.com (DFS)
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Newsgroups: comp.os.linux.advocacy
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<tLScndIqD8aC-zH4nZ2dnZfqn_WdnZ2d@supernews.com> <uohqvu$ngpv$1@solani.org>
<65acdd2e$0$16327$426a74cc@news.free.fr>
Content-Language: en-US
In-Reply-To: <65acdd2e$0$16327$426a74cc@news.free.fr>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 89
Message-ID: <kKbrN.44845$Iswd.2334@fx05.iad>
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Sun, 21 Jan 2024 16:36:32 UTC
Organization: blocknews - www.blocknews.net
Date: Sun, 21 Jan 2024 11:36:32 -0500
X-Received-Bytes: 3862
 by: DFS - Sun, 21 Jan 2024 16:36 UTC

On 1/21/2024 4:00 AM, Stéphane CARPENTIER wrote:
> Le 21-01-2024, Physfitfreak <Physfitfreak@gmail.com> a écrit :
>> On 1/20/2024 6:32 PM, Tyrone wrote:
>>> For the curious, there is a very long discussion about this at
>>> <https://www.physicsforums.com/threads/the-price-of-beer-linear-algebra-problem.1048253/>
>>
>>
>> But the post you gave the link for is also by "Diego Garcia"... :) Same
>> person as Farley. No?
>
> Yes, and Larry and Nux and some others. He's easy to recognise: he
> swears and laughs for no reason half of the time.

some others? Try 65+ others.

The Feeb freak thinks nymshifting and sockpuppeting is "advanced Usenet
skillz".

-------------------------------------------------
Adlbifhr Mjduhgfks <am@random.us>
Alvin P. Picker <app@gnu.rocks>
Bo Dai <bd@zen.rocks>
DG <dg@veronica.net>
David Goray <daveg@nighthawks.net>
Diego Garcia <dg@chaos.info>
Diego Garcia <dg@chaos.rocks>
Diego Garcia <dg@chaotic.info>
Diego Garcia <dg@gnu.rocks>
Dkjgkgjhsvb <dj@linux.rocks>
Doctor Studd <drstudd@clinic.info>
Dr. R. James <rjames@cccc.edu>
F Russell <fr@random.info>
F Russell <frussel@random.info>
F. Russell <fr@dkfjfoeeldsnx.info>
F. Russell <fr@random.info>
F. Russell <fr@zenmaster.info>
F. Russell <frussell@random.info>
FH <fidel@island.info>
FR <fr@random.info>
Fabian Russell <fabian@msd.org>
Fabian Russell <fb@zen.info>
Fabian Russell <fr314159@gmail.com>
Fabian Russell <fr@zen.info>
Fabian Russell <root@localhost.localdomain>
Farley Flud <ff@linux.rocks>
Frank Colessi <root@localhost.localdomain>
Frank Colessi <root@localhost.locldomain>
Frank Rifle <fr314159@random.info>
Gabriel Richard <gabby@sopso.net>
Joe Fantastic <jf@linux.rocks>
Joe Genteel <root@localhost.localdomain>
J​o​h​n​n​y​ ​P​s​a​ <jpsa@linux.rocks>
L Thorpe <lt666@sixsixsix.net>
L Thorpe <lt@random.info>
LAP <lap@lap.lap>
Lester Thorpe <lt11@thorpe.info>
Lester Thorpe <lt@gnu.rocks>
Lester Thorpe <lt@linux.rocks>
Lester Thorpe <lt@random.info>
Lester Thorpe <lt@zen.info>
Lester Thorpe <lthorpe@supeng.biz>
Lester Thorpe <ticiedept@gnu.rocks>
Leter Thorpe <lthorpe@supeng.biz>
Linux Baker <lb@indiebake.biz>
Lord Master <lordiemassa@gmail.com>
L​e​s​t​e​r​ ​T​h​o​r​p​e​ <lthorpe@supeng.biz>
N-Body <leymn@angsscapi.info>
N-Body <theat@rressoces.info>
Nux Vomica <nuxxie@ultimato.info>
Nux Vomica <nv@linux.rocks>
RottenRunt <rotrunt@loozers.net>
Sally Spitzburger <ss@dialup.net>
Six Six Six Beast <s3b@gnu.rocks>
Strong Vile <vile@gmail.com>
Vile Strong <vs22@ultimate.info>
Vile Strong <vs@zen.info>
Vince Vandal <v2@random.info>
Widow Maker <wm@elliptic.info>
Zohnny Psa <zpsa@linux.rocks>
dgray <dgray@random.info>
fr314159 <fr314159@gmail.com>
fr314159@gmail.com
frussel@random.info
larry.a.piet@gmail.com
-------------------------------------------------

Note: the last is his real name (short for Pietraskiewicz). The bum
used it in several replies he made to me.

Re: Programming Problem for Programmers (Not Monkeys)

<17ac71c5cbf82a78$25828$639368$802601b3@news.usenetexpress.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8252&group=comp.os.linux.advocacy#8252

  copy link   Newsgroups: comp.os.linux.advocacy
From: ff@linux.rocks (Farley Flud)
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Newsgroups: comp.os.linux.advocacy
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com> <uoi343$njhp$1@solani.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Lines: 39
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!news.usenetexpress.com!not-for-mail
Date: Sun, 21 Jan 2024 18:57:33 +0000
Nntp-Posting-Date: Sun, 21 Jan 2024 18:57:33 +0000
X-Received-Bytes: 1906
Organization: UsenetExpress - www.usenetexpress.com
X-Complaints-To: abuse@usenetexpress.com
Message-Id: <17ac71c5cbf82a78$25828$639368$802601b3@news.usenetexpress.com>
 by: Farley Flud - Sun, 21 Jan 2024 18:57 UTC

On Sat, 20 Jan 2024 21:30:10 -0600, Physfitfreak wrote:

>
> I'm not familiar with Pub jargon. What do you mean by 5/2 or 3/2 etc?
>

It means exactly what it says. "5/2" means that the total quantity purchased
was equivalent to 2-1/2 pints.

The lesson here is that the total cost of a given round must be rounded
to the nearest penny, or 2 decimal places, even if the price of a half-pint
may have 3 decimal places, e.g. 0.995 per half pint.

Such a rounding should be considered insignificant but the solution matrix
in this case is "ill-conditioned" which means that even a small rounding
error will have very large effects.

Using maxima/wxmaxima the condition number of the matrix, which is a measure
of its ill-conditioned state, is 5505.

Compare this to the notorious Hilbert matrix, which has a condition
number of 28375.

https://en.wikipedia.org/wiki/Hilbert_matrix

Thus, the matrix of this problem will take very small rounding errors
and produce very fucked up solutions (like a negative price).

The lesson here is that the REAL PROGRAMMER will be sure to check for
ill-conditioned matrices and use the appropriate methods.

(When I have time I will use special methods that handle ill-conditioned
matrices to solve this problem.)

But the CODE MONKEY will just ask Pappa Python to give an answer and
then accept the fucked up result.

CODE MONKEY != REAL PROGRAMMER

Re: Programming Problem for Programmers (Not Monkeys)

<uojrot$ohcp$1@solani.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8255&group=comp.os.linux.advocacy#8255

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!news.niel.me!glou.org!news.glou.org!fdn.fr!3.eu.feeder.erje.net!feeder.erje.net!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Physfitfreak@gmail.com (Physfitfreak)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: Sun, 21 Jan 2024 13:37:03 -0600
Message-ID: <uojrot$ohcp$1@solani.org>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<tLScndIqD8aC-zH4nZ2dnZfqn_WdnZ2d@supernews.com> <uohqvu$ngpv$1@solani.org>
<65acdd2e$0$16327$426a74cc@news.free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 21 Jan 2024 19:37:01 -0000 (UTC)
Injection-Info: solani.org;
logging-data="804249"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:1DqxSwzWV7a6say6uySVZBFkZ64=
In-Reply-To: <65acdd2e$0$16327$426a74cc@news.free.fr>
X-User-ID: eJwFwYEBwCAIA7CXYNIK52DF/09YgkWndhAMPLwY9GWy6/uaqbCi3I9VpbYrEZrXrawp9TqvrmF4lg9o/gNSNxWe
Content-Language: en-US
 by: Physfitfreak - Sun, 21 Jan 2024 19:37 UTC

On 1/21/2024 3:00 AM, Stéphane CARPENTIER wrote:
> Le 21-01-2024, Physfitfreak <Physfitfreak@gmail.com> a écrit :
>> On 1/20/2024 6:32 PM, Tyrone wrote:
>>> For the curious, there is a very long discussion about this at
>>> <https://www.physicsforums.com/threads/the-price-of-beer-linear-algebra-problem.1048253/>
>>
>>
>> But the post you gave the link for is also by "Diego Garcia"... :) Same
>> person as Farley. No?
>
> Yes, and Larry and Nux and some others. He's easy to recognise: he
> swears and laughs for no reason half of the time.
>

I'll tag "Larry" and "Nux" then too, so it'd be easy to see their posts
among the barrage of nonsense in this forum.

Any more nicknames he uses?

Re: Programming Problem for Programmers (Not Monkeys)

<uojtk3$ohcp$2@solani.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8256&group=comp.os.linux.advocacy#8256

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!paganini.bofh.team!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Physfitfreak@gmail.com (Physfitfreak)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: Sun, 21 Jan 2024 14:08:38 -0600
Message-ID: <uojtk3$ohcp$2@solani.org>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<tLScndIqD8aC-zH4nZ2dnZfqn_WdnZ2d@supernews.com> <uohqvu$ngpv$1@solani.org>
<65acdd2e$0$16327$426a74cc@news.free.fr> <kKbrN.44845$Iswd.2334@fx05.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 21 Jan 2024 20:08:36 -0000 (UTC)
Injection-Info: solani.org;
logging-data="804249"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:6rbj0VWml/OgKW9AOladKanMLjc=
X-User-ID: eJwNx8EBwCAIA8CVBAnCOKBk/xHa+x22i99jDjcQ5EWErOB/IQwp3KfbUruz7vF+b1e46dRSYc4bZxRoM4oPTCwV2A==
In-Reply-To: <kKbrN.44845$Iswd.2334@fx05.iad>
Content-Language: en-US
 by: Physfitfreak - Sun, 21 Jan 2024 20:08 UTC

On 1/21/2024 10:36 AM, DFS wrote:
> On 1/21/2024 4:00 AM, Stéphane CARPENTIER wrote:
>> Le 21-01-2024, Physfitfreak <Physfitfreak@gmail.com> a écrit :
>>> On 1/20/2024 6:32 PM, Tyrone wrote:
>>>> For the curious, there is a very long discussion about this at
>>>> <https://www.physicsforums.com/threads/the-price-of-beer-linear-algebra-problem.1048253/>
>>>
>>>
>>> But the post you gave the link for is also by "Diego Garcia"... :) Same
>>> person as Farley. No?
>>
>> Yes, and Larry and Nux and some others. He's easy to recognise: he
>> swears and laughs for no reason half of the time.
>
> some others?  Try 65+ others.
>
> The Feeb freak thinks nymshifting and sockpuppeting is "advanced Usenet
> skillz".
>
> -------------------------------------------------
> Adlbifhr Mjduhgfks <am@random.us>
> Alvin P. Picker <app@gnu.rocks>
> Bo Dai <bd@zen.rocks>
> DG <dg@veronica.net>
> David Goray <daveg@nighthawks.net>
> Diego Garcia <dg@chaos.info>
> Diego Garcia <dg@chaos.rocks>
> Diego Garcia <dg@chaotic.info>
> Diego Garcia <dg@gnu.rocks>
> Dkjgkgjhsvb <dj@linux.rocks>
> Doctor Studd <drstudd@clinic.info>
> Dr. R. James <rjames@cccc.edu>
> F Russell <fr@random.info>
> F Russell <frussel@random.info>
> F. Russell <fr@dkfjfoeeldsnx.info>
> F. Russell <fr@random.info>
> F. Russell <fr@zenmaster.info>
> F. Russell <frussell@random.info>
> FH <fidel@island.info>
> FR <fr@random.info>
> Fabian Russell <fabian@msd.org>
> Fabian Russell <fb@zen.info>
> Fabian Russell <fr314159@gmail.com>
> Fabian Russell <fr@zen.info>
> Fabian Russell <root@localhost.localdomain>
> Farley Flud <ff@linux.rocks>
> Frank Colessi <root@localhost.localdomain>
> Frank Colessi <root@localhost.locldomain>
> Frank Rifle <fr314159@random.info>
> Gabriel Richard <gabby@sopso.net>
> Joe Fantastic <jf@linux.rocks>
> Joe Genteel <root@localhost.localdomain>
> J​o​h​n​n​y​ ​P​s​a​ <jpsa@linux.rocks>
> L Thorpe <lt666@sixsixsix.net>
> L Thorpe <lt@random.info>
> LAP <lap@lap.lap>
> Lester Thorpe <lt11@thorpe.info>
> Lester Thorpe <lt@gnu.rocks>
> Lester Thorpe <lt@linux.rocks>
> Lester Thorpe <lt@random.info>
> Lester Thorpe <lt@zen.info>
> Lester Thorpe <lthorpe@supeng.biz>
> Lester Thorpe <ticiedept@gnu.rocks>
> Leter Thorpe <lthorpe@supeng.biz>
> Linux Baker <lb@indiebake.biz>
> Lord Master <lordiemassa@gmail.com>
> L​e​s​t​e​r​ ​T​h​o​r​p​e​ <lthorpe@supeng.biz>
> N-Body <leymn@angsscapi.info>
> N-Body <theat@rressoces.info>
> Nux Vomica <nuxxie@ultimato.info>
> Nux Vomica <nv@linux.rocks>
> RottenRunt <rotrunt@loozers.net>
> Sally Spitzburger <ss@dialup.net>
> Six Six Six Beast <s3b@gnu.rocks>
> Strong Vile <vile@gmail.com>
> Vile Strong <vs22@ultimate.info>
> Vile Strong <vs@zen.info>
> Vince Vandal <v2@random.info>
> Widow Maker <wm@elliptic.info>
> Zohnny Psa <zpsa@linux.rocks>
> dgray <dgray@random.info>
> fr314159 <fr314159@gmail.com>
> fr314159@gmail.com
> frussel@random.info
> larry.a.piet@gmail.com
> -------------------------------------------------
>
> Note: the last is his real name (short for Pietraskiewicz).  The bum
> used it in several replies he made to me.
>

Holy crap :-)))

Is that true? Hehe :) More work for me to tag all that.

You, who announce others' real names, what is your real name, you turd?
Are you turd enough to hide that but not respect others nicknames?

Cro-magnon from head to toe. With a brain that doesn't match the gender.
That must be the right combination to make a fucking Nazi coward.

Re: Programming Problem for Programmers (Not Monkeys)

<uojump$ohcp$3@solani.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8257&group=comp.os.linux.advocacy#8257

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!news.samoylyk.net!news.szaf.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Physfitfreak@gmail.com (Physfitfreak)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: Sun, 21 Jan 2024 14:27:05 -0600
Message-ID: <uojump$ohcp$3@solani.org>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<uoi343$njhp$1@solani.org> <65ace107$0$11901$426a74cc@news.free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 21 Jan 2024 20:27:05 -0000 (UTC)
Injection-Info: solani.org;
logging-data="804249"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:44y1oXqW6Wr2BCFgji+4hkvlpqk=
X-User-ID: eJwFwYkBADAEBLCVKE6N46n9R2hiAka7wqC2tpuQC2Ckgx6/ULSSUE7qtKdX9coEJ2XtCTmczqztzl33fF2CFaw=
In-Reply-To: <65ace107$0$11901$426a74cc@news.free.fr>
Content-Language: en-US
 by: Physfitfreak - Sun, 21 Jan 2024 20:27 UTC

On 1/21/2024 3:16 AM, Stéphane CARPENTIER wrote:
> Le 21-01-2024, Physfitfreak <Physfitfreak@gmail.com> a écrit :
>> On 1/20/2024 9:57 AM, Farley Flud wrote:
>>> During the course of
>>> this "lunch" four rounds were purchased, each consisting of combinations
>>> of bitter, lager, cider and stout. Due to an oversight the generous
>>> student made a record of who had drunk how much of each beer
>>
>> I'm not familiar with Pub jargon. What do you mean by 5/2 or 3/2 etc?
>
> I'm not familiar of that use of units neither. I believe, as a pint is
> something like half a litter, that means 5/2 consist of 5 pints or 2.5
> litters.
>
> For your information, I don't know what a bitter is, but the cider is
> not a kind of beer. A beer is done from barley when cider is done from
> apple. You could consider sake (the Japanese drink) as a beer even if
> it's rarely done. But cider is clearly different, it's more like wine.
>

Are you describing to an Iranian what beer is?... Beer was invented in
Iran (~ 7000 years back - almost soon after agriculture itself began).
Archeologists have found their instruments and some remnants of seeds
they used to make beer. I think the site was somewhere in northwestern
Iran (present West Azarbayjan province). The information came out in
1960s I think.

Anyway, he (Farley) needs to clarify those numbers before even I get the
feeling to delve into all that crap from 40 years back that I've forgotten.

Solving sets of linear equations doesn't have a perfect theory behind
it. It has methods that to some extent help you, and some which most
likely help you, but none that can help you 100 percent. And it is
involved and kind of tedious to understand via written sources. It is
much easier discussed in a class verbally; at least much faster to learn
them that way. But it is straightforward despite that. Anybody can do it.

So this problem might be a lot of work remembering all that crap again,
and I'm not sure I want to do that.

Re: Programming Problem for Programmers (Not Monkeys)

<uojvmv$ohcp$4@solani.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8258&group=comp.os.linux.advocacy#8258

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Physfitfreak@gmail.com (Physfitfreak)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: Sun, 21 Jan 2024 14:44:15 -0600
Message-ID: <uojvmv$ohcp$4@solani.org>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<uoi343$njhp$1@solani.org>
<17ac71c5cbf82a78$25828$639368$802601b3@news.usenetexpress.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 21 Jan 2024 20:44:15 -0000 (UTC)
Injection-Info: solani.org;
logging-data="804249"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VSsFgpJW4o8Uk6DRCzwlqE7gjHs=
X-User-ID: eJwFwQkBwDAIA0BLpSUB5IzPv4Td4VFYpgQVi6XLy/CmJb8osW9vkHX09G2NUpfmnB7NDlrdxLTO3BUA/gNJrxV5
In-Reply-To: <17ac71c5cbf82a78$25828$639368$802601b3@news.usenetexpress.com>
Content-Language: en-US
 by: Physfitfreak - Sun, 21 Jan 2024 20:44 UTC

On 1/21/2024 12:57 PM, Farley Flud wrote:
> On Sat, 20 Jan 2024 21:30:10 -0600, Physfitfreak wrote:
>
>>
>> I'm not familiar with Pub jargon. What do you mean by 5/2 or 3/2 etc?
>>
>
> It means exactly what it says. "5/2" means that the total quantity purchased
> was equivalent to 2-1/2 pints.
>
> The lesson here is that the total cost of a given round must be rounded
> to the nearest penny, or 2 decimal places, even if the price of a half-pint
> may have 3 decimal places, e.g. 0.995 per half pint.
>
> Such a rounding should be considered insignificant but the solution matrix
> in this case is "ill-conditioned" which means that even a small rounding
> error will have very large effects.
>
> Using maxima/wxmaxima the condition number of the matrix, which is a measure
> of its ill-conditioned state, is 5505.
>
> Compare this to the notorious Hilbert matrix, which has a condition
> number of 28375.
>
> https://en.wikipedia.org/wiki/Hilbert_matrix
>
> Thus, the matrix of this problem will take very small rounding errors
> and produce very fucked up solutions (like a negative price).
>
> The lesson here is that the REAL PROGRAMMER will be sure to check for
> ill-conditioned matrices and use the appropriate methods.
>
> (When I have time I will use special methods that handle ill-conditioned
> matrices to solve this problem.)
>
> But the CODE MONKEY will just ask Pappa Python to give an answer and
> then accept the fucked up result.
>
> CODE MONKEY != REAL PROGRAMMER
>

Certainly.

We did all that 40 years back when handling sets of linear equations.
Everything you say only sounds familiar to me now. And I vaguely
remember we handled even near singular matrices with SVD (Singular Value
Decomposition). We actually handled just about any difficulty that the
matrices could throw at us using the appropriate methods. We had no
other choice. It was never perfect but we got what we wanted out of
them. But I don't remember all that. It was a major part of the
numerical analysis course. I can't believe you're throwing such problems
at the audience in this forum.. :-) Hehe :)

You might as well ask "DFS" to memorize Kuran for you in the Chinese
language :) Hahhahah :)

Re: Programming Problem for Programmers (Not Monkeys)

<65ad853a$0$3011$426a74cc@news.free.fr>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8259&group=comp.os.linux.advocacy#8259

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.mixmin.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed1-b.proxad.net!nnrp4-2.free.fr!not-for-mail
Newsgroups: comp.os.linux.advocacy
From: sc@fiat-linux.fr (Stéphane CARPENTIER)
Subject: Re: Programming Problem for Programmers (Not Monkeys)
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<tLScndIqD8aC-zH4nZ2dnZfqn_WdnZ2d@supernews.com> <uohqvu$ngpv$1@solani.org>
<65acdd2e$0$16327$426a74cc@news.free.fr> <uojrot$ohcp$1@solani.org>
Organization: Mulots' Killer
User-Agent: slrn/pre1.0.4-9 (Linux)
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Date: 21 Jan 2024 20:57:30 GMT
Lines: 26
Message-ID: <65ad853a$0$3011$426a74cc@news.free.fr>
NNTP-Posting-Date: 21 Jan 2024 21:57:30 CET
NNTP-Posting-Host: 78.201.248.7
X-Trace: 1705870650 news-3.free.fr 3011 78.201.248.7:36658
X-Complaints-To: abuse@proxad.net
 by: Stéphane CARPENTIER - Sun, 21 Jan 2024 20:57 UTC

Le 21-01-2024, Physfitfreak <Physfitfreak@gmail.com> a écrit :
> On 1/21/2024 3:00 AM, Stéphane CARPENTIER wrote:
>> Le 21-01-2024, Physfitfreak <Physfitfreak@gmail.com> a écrit :
>>> On 1/20/2024 6:32 PM, Tyrone wrote:
>>>> For the curious, there is a very long discussion about this at
>>>> <https://www.physicsforums.com/threads/the-price-of-beer-linear-algebra-problem.1048253/>
>>>
>>>
>>> But the post you gave the link for is also by "Diego Garcia"... :) Same
>>> person as Farley. No?
>>
>> Yes, and Larry and Nux and some others. He's easy to recognise: he
>> swears and laughs for no reason half of the time.
>>
>
>
> I'll tag "Larry" and "Nux" then too, so it'd be easy to see their posts
> among the barrage of nonsense in this forum.
>
> Any more nicknames he uses?

Yes, a lot: DFS sent a list.

--
Si vous avez du temps à perdre :
https://scarpet42.gitlab.io

Re: Programming Problem for Programmers (Not Monkeys)

<uok21d$ohcp$5@solani.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8261&group=comp.os.linux.advocacy#8261

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Physfitfreak@gmail.com (Physfitfreak)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: Sun, 21 Jan 2024 15:23:56 -0600
Message-ID: <uok21d$ohcp$5@solani.org>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<uoi343$njhp$1@solani.org>
<17ac71c5cbf82a78$25828$639368$802601b3@news.usenetexpress.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 21 Jan 2024 21:23:57 -0000 (UTC)
Injection-Info: solani.org;
logging-data="804249"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:t0R9GXEJCKLyGfokEEfos6DpLeo=
Content-Language: en-US
In-Reply-To: <17ac71c5cbf82a78$25828$639368$802601b3@news.usenetexpress.com>
X-User-ID: eJwFwQkBACAIBLBKoHBAHD77R3DTC0abQCH69L2G8WQQU/QNDy9D+Uyv+zkH3pRWaZ7S/Cjp1gqws8zd9wNSgRXD
 by: Physfitfreak - Sun, 21 Jan 2024 21:23 UTC

On 1/21/2024 12:57 PM, Farley Flud wrote:
> (When I have time I will use special methods that handle ill-conditioned
> matrices to solve this problem.)

If it's going to be a labor of love, sure. Otherwise don't bother cause
the audience here will not recognize the importance of it and will never
read it; unless you're doing it for posterity, for those who in the
future might stumble into here with the right background, and needs, to
recognize the value of it. So if you're doing it for posterity, it would
help if you add sci.physics forum to the newsgroup header.

Speaking of posterity, now with Google Groups stopping the archiving of
messages, how's one to post something for other readers in the future?
Is there another free archive to access and as good as GG's?

Re: Programming Problem for Programmers (Not Monkeys)

<w7hrN.175532$vFZa.168435@fx13.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8270&group=comp.os.linux.advocacy#8270

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!usenet.network!news.neodome.net!weretis.net!feeder6.news.weretis.net!panix!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx13.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Betterbird (Windows)
From: nospam@dfs.com (DFS)
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Newsgroups: comp.os.linux.advocacy
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
Content-Language: en-US
In-Reply-To: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 119
Message-ID: <w7hrN.175532$vFZa.168435@fx13.iad>
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Sun, 21 Jan 2024 22:44:44 UTC
Organization: blocknews - www.blocknews.net
Date: Sun, 21 Jan 2024 17:44:45 -0500
X-Received-Bytes: 4629
 by: DFS - Sun, 21 Jan 2024 22:44 UTC

On 1/20/2024 10:57 AM, Farley Flud wrote:
> If you are a REAL PROGRAMMER you will solve this.
>
> If you are a CODE MONKEY you will screech and bang on the
> bars until Mamma Microslop throws you a banana.
>
> The Cost of Beer
>
> It was nearing Easter, and a group of students went to a local pub
> for a (liquid) lunch. Unfortunately, only one of them had any money.
> But this student kindly offered to pay for them all on the condition
> that they refunded the money at a later time. During the course of
> this "lunch" four rounds were purchased, each consisting of combinations
> of bitter, lager, cider and stout. Due to an oversight the generous
> student made a record of who had drunk how much of each beer and what
> the total cost of each round was, but failed to make a record of how
> much a pint of each of the beers was! Fortunately the student knew
> all about solving simultaneous equations and realized that it was
> possible to calculate the cost of the beers from the information
> available.
>
> The available data are summarized in the table below.
>
> ********* Need Monospace Font ************
>
> Pints of beer bought
>
> Round Bitter Lager Cider Stout Cost of round
> no.
>
> 1 3/2 2 5/2 1/2 8.99
>
> 2 5/2 1/2 2 5/2 10.46
>
> 3 2 5/2 3 1 11.78
>
> 4 1 2 0 5/2 7.99
>
>
> The student set the problem up in matrix form, denoting the costs
> of pints of bitter, lager, cider and stout as w, x, y and z
> respectively, giving a linear equation system.
>
> The student was aware of the problems that could occur if the
> matrix was less than full rank, and checked that the determinant was
> indeed non-zero. Thus in full confidence the student proceeded to
> calculate the cost of each beer. The results were:
>
> A pint of bitter cost: -3.86
>
> A pint of lager cost: 0.60
>
> A pint of cider cost: 4.58
>
> A pint of stout cost: 4.26
>
> The student was puzzled! On checking the calculations no errors
> were found! The charges made by the publican were also correct.
>
> If nobody made any error why does it look like the students were
> being paid to drink bitter? What are the correct prices?
>
> Monkey want banana? Then monkey solve problem.
>
> Hey. It's straightforward high-school linear algebra.
>
> Ha, ha, ha, ha, ha, ha, ha!

import numpy as np
from numpy import linalg as la

# Rnd B L C S Cost
# 1 1.5 2 2.5 0.5 8.99
# 2 2.5 0.5 2 2.5 10.46
# 3 2 2.5 3 1 11.78
# 4 1 2 0 2.5 7.99

#inputs
amts = np.array([[1.5,2.0,2.5,0.5], [2.5,0.5,2.0,2.5],[2.0,2.5,3.0,1.0],
[1.0,2.0,0.0,2.5]])
cost = np.array([8.99,10.46,11.78,7.99])

#recap and solve
float_formatter = "{: .1f}".format
np.set_printoptions(formatter={'float_kind':float_formatter})
print("Round - Bitter Lager Cider Stout")
print("1. ", amts[0])
print("2. ", amts[1])
print("3. ", amts[2])
print("4. ", amts[3])

float_formatter = "{:.2f}".format
np.set_printoptions(formatter={'float_kind':float_formatter})

print("Cost: ", cost)
print("Dimensions: ",amts.ndim)
print("Datatype : ",amts.dtype)
print("Shape : ",amts.shape)

print("Condition")
print(" None : %d" % (la.cond(amts, None)))
print(" Frobenius: %d" % (la.cond(amts, 'fro')))
print(" inf : %d" % (la.cond(amts, np.inf)))
print(" -inf : %d" % (la.cond(amts, -np.inf)))
print(" 1 : %d" % (la.cond(amts, 1)))
print(" -1 : %d" % (la.cond(amts, -1)))
print(" 2 : %d" % (la.cond(amts, 2)))
print(" -2 : %d" % (la.cond(amts, -2)))

print("Solution :",la.solve(amts,cost))

if la.cond(amts, None) >= 2.0:
print("Amt matrix is ill-conditioned, like the clownish Feeb")

(I know, I know: a condition nbr > 2 isn't a hard and fast rule. But
anything significantly > 1 means an ill-conditioned matrix.)

Re: Programming Problem for Programmers (Not Monkeys)

<l15nmbF5bvvU8@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8271&group=comp.os.linux.advocacy#8271

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bowman@montana.com (rbowman)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: 21 Jan 2024 23:29:16 GMT
Lines: 8
Message-ID: <l15nmbF5bvvU8@mid.individual.net>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<uoi343$njhp$1@solani.org> <65ace107$0$11901$426a74cc@news.free.fr>
<uojump$ohcp$3@solani.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Oy8RLnN9KbCNZI3U4RwZvgJd3jktAP5kr3dE2cyYtKnya7erLY
Cancel-Lock: sha1:ZRTBD1auK4tk/7aG+C2ks4F2SUM= sha256:aNAo5QeXgPkg2dcs6QlrR0LljTT8aGn1wvDAh7Od3CM=
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
 by: rbowman - Sun, 21 Jan 2024 23:29 UTC

On Sun, 21 Jan 2024 14:27:05 -0600, Physfitfreak wrote:

> So this problem might be a lot of work remembering all that crap again,
> and I'm not sure I want to do that.

+1. I don't consider it a good thing to be able to truthfully say I've
forgotten more about some things than most people will ever know but so it
goes.

Re: Programming Problem for Programmers (Not Monkeys)

<uokjcp$osag$1@solani.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8272&group=comp.os.linux.advocacy#8272

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Physfitfreak@gmail.com (Physfitfreak)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: Sun, 21 Jan 2024 20:20:08 -0600
Message-ID: <uokjcp$osag$1@solani.org>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<w7hrN.175532$vFZa.168435@fx13.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 22 Jan 2024 02:20:09 -0000 (UTC)
Injection-Info: solani.org;
logging-data="815440"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:YBq2GBBH/MyKVzFk9TA0vbkVRKM=
In-Reply-To: <w7hrN.175532$vFZa.168435@fx13.iad>
X-User-ID: eJwNysERACEIA8CWQEnwyhEl/ZdwfncWk86TQTAgaPuug1RhLdptjYSGwSy1LD4/apY3LxUVZf2gdw72fCN/ZOIWLQ==
Content-Language: en-US
 by: Physfitfreak - Mon, 22 Jan 2024 02:20 UTC

On 1/21/2024 4:44 PM, DFS wrote:
> On 1/20/2024 10:57 AM, Farley Flud wrote:
>> If you are a REAL PROGRAMMER you will solve this.
>>
>> If you are a CODE MONKEY you will screech and bang on the
>> bars until Mamma Microslop throws you a banana.
>>
>> The Cost of Beer
>>
>> It was nearing Easter, and a group of students went to a local pub
>> for a (liquid) lunch. Unfortunately, only one of them had any money.
>> But this student kindly offered to pay for them all on the condition
>> that they refunded the money at a later time. During the course of
>> this "lunch" four rounds were purchased, each consisting of combinations
>> of bitter, lager, cider and stout. Due to an oversight the generous
>> student made a record of who had drunk how much of each beer and what
>> the total cost of each round was, but failed to make a record of how
>> much a pint of each of the beers was! Fortunately the student knew
>> all about solving simultaneous equations and realized that it was
>> possible to calculate the cost of the beers from the information
>> available.
>>
>> The available data are summarized in the table below.
>>
>> *********  Need Monospace Font ************
>>
>> Pints of beer bought
>>
>> Round    Bitter    Lager    Cider    Stout    Cost of round
>> no.
>>
>> 1    3/2    2    5/2    1/2    8.99
>>
>> 2    5/2    1/2    2    5/2    10.46
>>
>> 3    2    5/2    3    1    11.78
>>
>> 4    1    2    0    5/2    7.99
>>
>>
>> The student set the problem up in matrix form, denoting the costs
>> of pints of bitter, lager, cider and stout as w, x, y and z
>> respectively, giving a linear equation system.
>>
>> The student was aware of the problems that could occur if the
>> matrix was less than full rank, and checked that the determinant was
>> indeed non-zero. Thus in full confidence the student proceeded to
>> calculate the cost of each beer. The results were:
>>
>> A pint of bitter cost: -3.86
>>
>> A pint of lager cost: 0.60
>>
>> A pint of cider cost: 4.58
>>
>> A pint of stout cost: 4.26
>>
>> The student was puzzled! On checking the calculations no errors
>> were found! The charges made by the publican were also correct.
>>
>> If nobody made any error why does it look like the students were
>> being paid to drink bitter? What are the correct prices?
>>
>> Monkey want banana?  Then monkey solve problem.
>>
>> Hey.  It's straightforward high-school linear algebra.
>>
>> Ha, ha, ha, ha, ha, ha, ha!
>
> import numpy as np
> from numpy import linalg as la
>
> # Rnd     B       L        C        S        Cost
> # 1        1.5        2        2.5        0.5        8.99
> # 2        2.5        0.5        2        2.5        10.46
> # 3        2        2.5        3        1        11.78
> # 4        1        2        0        2.5        7.99
>
> #inputs
> amts = np.array([[1.5,2.0,2.5,0.5], [2.5,0.5,2.0,2.5],[2.0,2.5,3.0,1.0],
> [1.0,2.0,0.0,2.5]])
> cost = np.array([8.99,10.46,11.78,7.99])
>
> #recap and solve
> float_formatter = "{: .1f}".format
> np.set_printoptions(formatter={'float_kind':float_formatter})
> print("Round - Bitter Lager Cider Stout")
> print("1.     ", amts[0])
> print("2.     ", amts[1])
> print("3.     ", amts[2])
> print("4.     ", amts[3])
>
> float_formatter = "{:.2f}".format
> np.set_printoptions(formatter={'float_kind':float_formatter})
>
> print("Cost:  ", cost)
> print("Dimensions: ",amts.ndim)
> print("Datatype  : ",amts.dtype)
> print("Shape     : ",amts.shape)
>
> print("Condition")
> print(" None     : %d" % (la.cond(amts, None)))
> print(" Frobenius: %d" % (la.cond(amts, 'fro')))
> print(" inf      : %d" % (la.cond(amts, np.inf)))
> print(" -inf     : %d" % (la.cond(amts, -np.inf)))
> print(" 1        : %d" % (la.cond(amts, 1)))
> print(" -1       : %d" % (la.cond(amts, -1)))
> print(" 2        : %d" % (la.cond(amts, 2)))
> print(" -2       : %d" % (la.cond(amts, -2)))
>
> print("Solution  :",la.solve(amts,cost))
>
> if la.cond(amts, None) >= 2.0:
>     print("Amt matrix is ill-conditioned, like the clownish Feeb")
>
>
> (I know, I know: a condition nbr > 2 isn't a hard and fast rule.  But
> anything significantly > 1 means an ill-conditioned matrix.)
>
>

Yes if you want to trust a package to solve your linear set of equations.

Especially in this type of problems, I think nobody should trust anyone
else. You just have to begin with learning and understanding the brute
force method first (the way we did it in high schools). And then see for
yourself the situations that you have to find a way to improve upon
them, then learn, one by one, a series of other methods, each dealing
with peculiarities of certain matrices (if you're lucky enough to have a
matrix on your hands that has such features), and use them till you
become comfortable with them, and only then begin your handling of this
problem. I don't think there's a shortcut for this.

And writing correct codes to solve this type of problems is very
sensitive. 2-dimensional arrays are everywhere, loops are everywhere,
and the work is an intermingling of what a 2-dim array means for your
computer, your matrix, the programming language you're using, and what
you have in mind to do for which you're proceeding to code. Very careful
work!

Find a good numerical methods book that both discusses the subjects
clearly, and gives examples and problems to solve, and read only the
chapter on solving sets of linear equations.

The math used and given should _not_ be at a level for those with a math
degree and background. It should be just sophisticated enough to make
the concepts and explanations clear for someone who is only interested
to solve a problem, knowing what he's doing, and wants to do it with
confidence.

Also, the coverage need not be extensive. Just the first four or five
methods given in the book should do.

And you need to know how your programming language stores arrays in the
computer. Different programming languages store matrix information
differently, and this is important in understanding what those "four or
five methods" are talking about. If the language you're using and the
descriptions given in that chapter don't match, you might as well forget
it.

I distinctly remember that FORTRAN was different from a couple of other
languages discussed in various textbook sources, in how it stored the
matrix information (two dimensional arrays) in the computer, so we could
not use such sources for this type of problems. One would store them by
columns and one by rows. The computer always stores them in one row, but
the contents of that one row depends on the programming language you're
using. So you have to make sure the language you use matches the book
you are reading about such subjects, if the book is giving code examples!

That's all I can say (all I can remember) about it.

Farley was right about saying something to the effect of, "If you can
solve and write the codes for this kind of problems, then you're a
programmer!"

Something positive can be said about this mess too :) _All_ such
knowledge were already at hand by the end of 1960s (they needed them in
the industries, etc). So even old books with yellowed pages you can find
in half price books have a wealth of useful numerical methods
information if they were written after the 1960s. So if you ask me, you
don't have to make sure it is a recent book at all. The three key
components (computers, programming languages, and numerical methods)
were fully at hand already then.

Re: Programming Problem for Programmers (Not Monkeys)

<l1649rF9gltU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8273&group=comp.os.linux.advocacy#8273

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bowman@montana.com (rbowman)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: 22 Jan 2024 03:04:28 GMT
Lines: 24
Message-ID: <l1649rF9gltU1@mid.individual.net>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<w7hrN.175532$vFZa.168435@fx13.iad> <uokjcp$osag$1@solani.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 5hBVfbamOoLdd4dM5R2FTQa67v4MoY8TvulwlK/Lw3SLQ1118M
Cancel-Lock: sha1:OhC9o2y1ObtBPKT9n4rfLUdICe4= sha256:wl6MvufqbV4QtotQltt5Du+6sabCzL0nrca0cxgJLTA=
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
 by: rbowman - Mon, 22 Jan 2024 03:04 UTC

On Sun, 21 Jan 2024 20:20:08 -0600, Physfitfreak wrote:

> Yes if you want to trust a package to solve your linear set of
> equations.

Do you trust your compiler to store matrices correctly and to generate the
machine ops to access them by indices? Or do you find a dusty copy of the
Dragon book and roll your own?

https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools

Do you trust lex/yacc or flex/bison or is that another DIY project?

While I agree understanding the fundamentals is important ignoring well
proven tools and libraries will reduce your productivity to someplace near
zero.

I use black boxes. Sometimes I pry the lid off if I'm interested in what
is really happening. Other times I am grateful for the abstraction.
'Pretty good' works for me. For example I have a pretty good idea of how a
router maps MAC addresses, handles retransmission of packets, and so forth
but I don't feel compelled to write router firmware or for that matter to
log into a router and tweak parameters.

Re: Programming Problem for Programmers (Not Monkeys)

<uoknut$ov3r$1@solani.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8274&group=comp.os.linux.advocacy#8274

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Physfitfreak@gmail.com (Physfitfreak)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: Sun, 21 Jan 2024 21:38:04 -0600
Message-ID: <uoknut$ov3r$1@solani.org>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<uoi343$njhp$1@solani.org> <65ace107$0$11901$426a74cc@news.free.fr>
<uojump$ohcp$3@solani.org> <l15nmbF5bvvU8@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 22 Jan 2024 03:38:05 -0000 (UTC)
Injection-Info: solani.org;
logging-data="818299"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:QuqKJg8ADCXck0A57NqyquqjWWE=
X-User-ID: eJwNxMEBwCAIA8CVqgTEcQgl+4/Q3uPcYkUfhAdcLj7A34lZV1P2ELxSMzteckOR09N0FQfeXqldFpiVlvoAidUXFQ==
In-Reply-To: <l15nmbF5bvvU8@mid.individual.net>
Content-Language: en-US
 by: Physfitfreak - Mon, 22 Jan 2024 03:38 UTC

On 1/21/2024 5:29 PM, rbowman wrote:
> On Sun, 21 Jan 2024 14:27:05 -0600, Physfitfreak wrote:
>
>> So this problem might be a lot of work remembering all that crap again,
>> and I'm not sure I want to do that.
>
> +1. I don't consider it a good thing to be able to truthfully say I've
> forgotten more about some things than most people will ever know but so it
> goes.

The material to know is not that much. It's easy and straightforward.
Messing with them and using them and experimenting with them and trying
them for your problems is what makes relearning them a wrestle.

The subject is not like reading a chapter in college algebra about, say,
quadratic equations, and then kick the hell out of all cases of
quadratic equations coming to you for the rest of your life :)

The methods you learn may or may not work. The set of linear equations
you're trying to solve may or may not be yielding accurate enough
solutions. Round off errors can get horrendous. So you need to try the
solutions to see how good they are, then see, for instance, if you could
use iteration to make them better (that was one of the methods).
Sometimes you have to change your matrix to something else, or decompose
it into two or more different matrices to be able to get a more accurate
set of solutions. For each case, some methods would always work better
than others, but you have to find out which ones. So the effort and time
increases by all these features associated with this type of problems.
Solutions of "quadratic equations" have none of such fuss about them :)

That's why you need to have at least several methods under your belt to
be able to use if necessary.

Then increasing the number of equations, makes every underlying problem
more difficult to handle, and takes much more computer time to solve. If
I remember it right, in some cases we had to first deal with a submatrix
inside the actual matrix and try to make that, say, tridiagonal, or
triangular, etc, then go to the next submatrix and do the same until we
could make the whole matrix tridiagonal (or triangular) cause that would
make the problem much more accurate to solve, since there were powerful
methods just for such matrices to yield best results.

After you learn such methods, you need to develop a keen eye for useful
features that your matrix has, so you could immediately put it into use
by using the appropriate method that's designed to take advantage of
such features.

I hope this clarifies what I meant. But none of this is reason to get
intimidated by the amount of stuff to learn. It is actually easy stuff
to learn, and very exciting and engaging to use, and soon you would want
to spend more and more time trying this and that on your own. It becomes
close to a "skill" that you'd want to use :) Like a chess player wants
to play more and more games as he gets better in it.

Farley cannot wait to use them for this problem. Hehe :) I wish I could
do that too.

Re: Programming Problem for Programmers (Not Monkeys)

<l16761F9gltU5@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8275&group=comp.os.linux.advocacy#8275

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bowman@montana.com (rbowman)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: 22 Jan 2024 03:53:37 GMT
Lines: 11
Message-ID: <l16761F9gltU5@mid.individual.net>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<uoi343$njhp$1@solani.org> <65ace107$0$11901$426a74cc@news.free.fr>
<uojump$ohcp$3@solani.org> <l15nmbF5bvvU8@mid.individual.net>
<uoknut$ov3r$1@solani.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net eCkBIKPnNI22nQQQ2Drm9gJxTBPyG3IUMR84cMp6kGNxDqDozQ
Cancel-Lock: sha1:zDeOaTmVMLU3VuLwkpMtCLKHkaY= sha256:9QQwI0JSXfT5oFifTObbAdNo2w9Xm2wwuADNcPZ9UvA=
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
 by: rbowman - Mon, 22 Jan 2024 03:53 UTC

On Sun, 21 Jan 2024 21:38:04 -0600, Physfitfreak wrote:

> I hope this clarifies what I meant. But none of this is reason to get
> intimidated by the amount of stuff to learn. It is actually easy stuff
> to learn, and very exciting and engaging to use, and soon you would want
> to spend more and more time trying this and that on your own. It becomes
> close to a "skill" that you'd want to use Like a chess player wants to
> play more and more games as he gets better in it.

Whatever fluffs your fur.

Re: Programming Problem for Programmers (Not Monkeys)

<uokp6p$ov3r$2@solani.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8276&group=comp.os.linux.advocacy#8276

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Physfitfreak@gmail.com (Physfitfreak)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: Sun, 21 Jan 2024 21:59:20 -0600
Message-ID: <uokp6p$ov3r$2@solani.org>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<w7hrN.175532$vFZa.168435@fx13.iad> <uokjcp$osag$1@solani.org>
<l1649rF9gltU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 22 Jan 2024 03:59:21 -0000 (UTC)
Injection-Info: solani.org;
logging-data="818299"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:4zFFHTFZts7x7rV2e3tU2XWXq/8=
In-Reply-To: <l1649rF9gltU1@mid.individual.net>
Content-Language: en-US
X-User-ID: eJwNycEBwCAIA8CVQCDYcUDM/iPU710YFCcdAQ8GFxlmzPOEe1Zf74zZoi+z9FIKCYo0tLi8BqPe1hJZ3/4BYWQVvw==
 by: Physfitfreak - Mon, 22 Jan 2024 03:59 UTC

On 1/21/2024 9:04 PM, rbowman wrote:
> On Sun, 21 Jan 2024 20:20:08 -0600, Physfitfreak wrote:
>
>> Yes if you want to trust a package to solve your linear set of
>> equations.
>
> Do you trust your compiler to store matrices correctly and to generate the
> machine ops to access them by indices? Or do you find a dusty copy of the
> Dragon book and roll your own?
>
> https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools
>
> Do you trust lex/yacc or flex/bison or is that another DIY project?
>
> While I agree understanding the fundamentals is important ignoring well
> proven tools and libraries will reduce your productivity to someplace near
> zero.
>
> I use black boxes. Sometimes I pry the lid off if I'm interested in what
> is really happening. Other times I am grateful for the abstraction.
> 'Pretty good' works for me. For example I have a pretty good idea of how a
> router maps MAC addresses, handles retransmission of packets, and so forth
> but I don't feel compelled to write router firmware or for that matter to
> log into a router and tweak parameters.
>

It depends on how sensitive the work is for you, and what it is that you
want to do.

I can go to the other extreme of what you just said, to give you a
similar example to yours :)

We had a frequenter in sci.physics with alias "Uncle Al." He had a
chemistry background but later had found out he needed to know a heck of
a lot of physics to do anything beyond ordinary in chemistry. And he was
very ambitious; he wanted to get a Nobel Prize. Seriously.

He was very talented also. His physics knowledge was quite extensive. So
he worked on this theoretical concept and predicted some stuff. Now he
needed to show that his prediction matched reality. He arranged an
experiment and collected lots of data.

But then see what happened. Being not a physicist, he asked someone on
the other side of the USA to write a computer program to numerically
compare the predictions of his theory with the actual data!...

Would you trust someone else with that task? No. Not if you are a
physicist anyway. And certainly not if you want to get a Nobel Prize for
it.

I asked him why he didn't want to do it himself. His response was
something to the effect of, "That guy is expert in computer programming
while I don't know anything about it."

To me, it was a totally faulty reasoning.

So it is a matter of how important the task is for you, and what problem
it is that you're tackling.

Re: Programming Problem for Programmers (Not Monkeys)

<275b95ea-91c5-416b-a48e-028df94c6e41n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8283&group=comp.os.linux.advocacy#8283

  copy link   Newsgroups: comp.os.linux.advocacy
X-Received: by 2002:a05:620a:4109:b0:783:96b0:4a00 with SMTP id j9-20020a05620a410900b0078396b04a00mr63718qko.6.1705924877630;
Mon, 22 Jan 2024 04:01:17 -0800 (PST)
X-Received: by 2002:a05:622a:5908:b0:42a:dc3:3155 with SMTP id
ga8-20020a05622a590800b0042a0dc33155mr675477qtb.11.1705924877335; Mon, 22 Jan
2024 04:01:17 -0800 (PST)
Path: i2pn2.org!i2pn.org!news.swapon.de!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.linux.advocacy
Date: Mon, 22 Jan 2024 04:01:17 -0800 (PST)
In-Reply-To: <uokp6p$ov3r$2@solani.org>
Injection-Info: google-groups.googlegroups.com; posting-host=67.149.153.65; posting-account=VHdvsQoAAAB0SHzFot62NmvVr15syA7-
NNTP-Posting-Host: 67.149.153.65
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<w7hrN.175532$vFZa.168435@fx13.iad> <uokjcp$osag$1@solani.org>
<l1649rF9gltU1@mid.individual.net> <uokp6p$ov3r$2@solani.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <275b95ea-91c5-416b-a48e-028df94c6e41n@googlegroups.com>
Subject: Re: Programming Problem for Programmers (Not Monkeys)
From: lordiemassa@gmail.com (Lord Master)
Injection-Date: Mon, 22 Jan 2024 12:01:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Lord Master - Mon, 22 Jan 2024 12:01 UTC

On Sunday, January 21, 2024 at 10:59:26 PM UTC-5, Physfitfreak wrote:
>
> We had a frequenter in sci.physics with alias "Uncle Al." He had a
> chemistry background but later had found out he needed to know a heck of
> a lot of physics to do anything beyond ordinary in chemistry.
>

I remember Uncle Al. He was a capable and dedicated participant to sci.physics
but he eventually left the group because it had become, in his words, "a river of shit."

Indeed it has, and so too is C.O.L.A.

But I shall return to the topic.

>
> Would you trust someone else with that task? No. Not if you are a
> physicist anyway.
>

One should not trust anything. Companies routinely subject their raw materials
to testing and will only trust suppliers who have a solid track record of reliability.

It's the same with software. Quality software always includes a test suite and I
always subject my important software to some sort of test.

GCC and most other GNU software have already established a solid track record
of reliability.

FOSS software is more trustworthy because the authors are directly known and would
suffer tremendous shame and ridicule if they were to fail. In contrast, the authors
of commercial software are totally hidden and only the corporate entity takes the
blame. When it comes to software, reputation is a far more potent motivator than is
monetary compensation.

Re: Programming Problem for Programmers (Not Monkeys)

<l17o8rFi7jlU6@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8303&group=comp.os.linux.advocacy#8303

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bowman@montana.com (rbowman)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Programming Problem for Programmers (Not Monkeys)
Date: 22 Jan 2024 17:51:24 GMT
Lines: 21
Message-ID: <l17o8rFi7jlU6@mid.individual.net>
References: <17ac195c76bdcff1$39350$1544542$802601b3@news.usenetexpress.com>
<w7hrN.175532$vFZa.168435@fx13.iad> <uokjcp$osag$1@solani.org>
<l1649rF9gltU1@mid.individual.net> <uokp6p$ov3r$2@solani.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net pI3GgYvisUzTTW99b6qn5AxPDICSqzVV3DXvSp2NwakpswUyBB
Cancel-Lock: sha1:DHkadgxqXGqumZy/yXOiNrbyjlc= sha256:E4EB5qJxOpC+Nggzg+EEnL1GOixuBICbaMk8sVdg4zg=
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
 by: rbowman - Mon, 22 Jan 2024 17:51 UTC

On Sun, 21 Jan 2024 21:59:20 -0600, Physfitfreak wrote:

> Would you trust someone else with that task? No. Not if you are a
> physicist anyway. And certainly not if you want to get a Nobel Prize for
> it.
>
> I asked him why he didn't want to do it himself. His response was
> something to the effect of, "That guy is expert in computer programming
> while I don't know anything about it."

I once worked with a very knowledgeable PhD chemist. Other than college
chemistry I have no background in the field. I worked with him to create
the necessary software since I am a computer programmer.

That's not an isolated instance. Much of programming is working with
people who know what they want to do but have no idea how to make it
happen. They supply the specialized knowledge, I supply the code.

A good technical writer is the same. They ask questions and reduce the
answers to a legible document. They are not experts in the targeted field
but they are expert at their job.


computers / comp.os.linux.advocacy / Programming Problem for Programmers (Not Monkeys)

Pages:123456
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor