[net.puzzle] Derivative of x! and actual interviews

joel@decwrl.UUCP (Joel McCormack) (03/27/85)

Great interview question, that derivative of x!

I'm not sure what job in computers requires knowing how to do this on the
fly, but it seems if it has any relationship to programming, all you bozos
managed to fool your interviewers into thinking you really knew something
when you didn't.

I couldn't solve it without digging out my old books, either, mind you,
which makes me a bozo, I guess, but I find myself well-qualified as a
programmer. 

So why the original heading?  Did whomever posted the original question
REALLY think it would help separate the programmers from the hackers, or
engineers from tinkerers, or whatever?

-- 
- Joel McCormack {ihnp4 decvax ucbvax allegra}!decwrl!joel
		 joel@decwrl.arpa

john@x.UUCP (John Woods) (03/28/85)

> I couldn't solve it without digging out my old books, either, mind you,
> which makes me a bozo, I guess, but I find myself well-qualified as a
> programmer. 
>
Observing the field from the inside, I have found that most well-qualified
programmers are bozos!

(-: HONK! :-)
-- 
John Woods, Charles River Data Systems, Framingham MA, (617) 626-1101
...!decvax!frog!john, ...!mit-eddie!jfw, jfw%mit-ccc@MIT-XX.ARPA

I think we're all Bozos on this bus!
		-FST

mouli@cavell.UUCP (Bopsi ChandraMouli) (03/30/85)

In article <1337@decwrl.UUCP> joel@decwrl.UUCP (Joel McCormack) writes:

>So why the original heading?  Did whomever posted the original question
>REALLY think it would help separate the programmers from the hackers, or
>engineers from tinkerers, or whatever?
>
If we forget about the gamma function(of which
I never thought about when I posted the question) then the answer
to the question does not need any digging into the books.
The necessary and sufficient condition
for the derivative of a function to be defined is that the
function should be continuous(and x! is not). Answering this question on the
fly requires JUST clear thinking and good understanding of the
fundamentals of what one has learnt before. Irrespective of what
the job is, these two are good qualities(in addition to others)
that the employer would expect from prospective employees.

Thus the question on derivative of x!(and other questions of similar nature)
serves that important purpose in an interview.  

By the way, I am still strugging with the derivative of the gamma
function. Has anyone managed to get that?  If so, please post.

Bopsi Chandramouli.
ihnp4!alberta!cavell!mouli

stekas@hou2g.UUCP (J.STEKAS) (03/31/85)

 From  mouli@cavell.UUCP (Bopsi Chandramouli)

> The necessary and sufficient condition for the derivative of a function
> to be defined is that the function should be continuous (and x! is not).
> Answering this question on the fly requires JUST clear thinking and good
> understanding of the fundamentals of what one has learnt before. ...

> Thus the question on derivative of x! (and other questions of similar nature)
> serves that important purpose in an interview.  

That question would weed out un-clear thinkers of the order of Ludwig
Boltzman who built statistical mechanics on the large integer limit of
the binomial distribution, [N!/(N-n)!n!].  Today we think nothing of
differentiating Poisson and Gaussian functions when we KNOW they represent
approximations of the discontinuous binomial function.

Perhaps the interviewer who used this question will one day be fortunate
enough to face an equally petty interviewer.

					Jim

msb@lsuc.UUCP (Mark Brader) (04/02/85)

Bopsi Chandramouli writes:	

> > The necessary and sufficient condition for the derivative of a function
> > to be defined is that the function should be continuous (and x! is not).
> > Answering this question on the fly requires JUST clear thinking and good
> > understanding of the fundamentals of what one has learnt before. ...

J. Stekas responds:

> That question would weed out un-clear thinkers of the order of Ludwig
> Boltzman who built statistical mechanics on the large integer limit of
> the binomial distribution, [N!/(N-n)!n!]....
> 
> Perhaps the interviewer who used this question will one day be fortunate
> enough to face an equally petty interviewer.

I suggest that the proper response to this question in real life is:

"x! isn't differentiable, because it isn't continuous.  Or did you mean
the derivative of the gamma function, the real-number analog of x!?" (?!)

If the question is being posed in written form, I would stand with the
correct answer, i.e., the first one.  Anyone asking that question to
test my math who expects the derivative of gamma, I don't want to work for.

Mark Brader

ndiamond@watdaisy.UUCP (Norman Diamond) (04/02/85)

> Anyone asking that question to test my math who expects the derivative of
> gamma, I don't want to work for.
> 
> --  Mark Brader

It's a perfectly reasonable question for certain employers to ask applicants
for certain positions.  If 100% of us were compiler hacks and OS hacks, there
would be no demand for our products in business.  If 0% of us were so, then
there would be no computer industry.  Some excellent employers need all kinds
of people.  There are certain jobs you (and I) don't want.

-- 

   Norman Diamond

UUCP:  {decvax|utzoo|ihnp4|allegra}!watmath!watdaisy!ndiamond
CSNET: ndiamond%watdaisy@waterloo.csnet
ARPA:  ndiamond%watdaisy%waterloo.csnet@csnet-relay.arpa

"Opinions are those of the keyboard, and do not reflect on me or higher-ups."

gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (04/06/85)

> > The necessary and sufficient condition for the derivative of a function
> > to be defined is that the function should be continuous (and x! is not).

Another example of testers not being smart enough.  I used to get into
arguments with IQ testers, who would pose such stupid questions as:

	What is the next number in the series
		2, 3, 5, 7, ...

colonel@gloria.UUCP (Col. G. L. Sicherman) (04/06/85)

> > Perhaps the interviewer who used this question will one day be fortunate
> > enough to face an equally petty interviewer.
> 
> I suggest that the proper response to this question in real life is:
> 
> "x! isn't differentiable, because it isn't continuous.  Or did you mean
> the derivative of the gamma function, the real-number analog of x!?" (?!)

Petty interviewer: "Don't give me that, you little snot.  You know
	what I want!"
-- 
Col. G. L. Sicherman
...{rocksvax|decvax}!sunybcs!colonel

john@x.UUCP (John Woods) (04/08/85)

> > > The necessary and sufficient condition for the derivative of a function
> > > to be defined is that the function should be continuous (and x! is not).
> 
> Another example of testers not being smart enough.  I used to get into
> arguments with IQ testers, who would pose such stupid questions as:
> 
> 	What is the next number in the series
> 		2, 3, 5, 7, ...
> 

Nine: the sequence is +2, +2, +2, +2, ... with an experimental error in the
first measurement....:-)

Anyone else for interesting interpretations?
-- 
John Woods, Charles River Data Systems, Framingham MA, (617) 626-1101
...!decvax!frog!john, ...!mit-eddie!jfw, jfw%mit-ccc@MIT-XX.ARPA

You can't spell "vile" without "vi".

edward@ukma.UUCP (Edward C. Bennett) (04/09/85)

> 
> 	What is the next number in the series
> 		2, 3, 5, 7, ...
> 
	I sure hope that the next number is 11. Primes, right?
(Boy will I feel dumb if this isn't the right answer.)

-- 
edward

		 {ucbvax,unmvax,boulder,research}!anlams! -|
			{mcvax!qtlon,vax135,mddc}!qusavx! -|-->	ukma!edward
     {decvax,ihnp4,mhuxt,clyde,osu-eddie,ulysses}!cbosgd! -|

krs@amdahl.UUCP (Kris Stephens) (04/12/85)

> > 
> > 	What is the next number in the series
> > 		2, 3, 5, 7, ...
> > 
> 	I sure hope that the next number is 11. Primes, right?
> (Boy will I feel dumb if this isn't the right answer.)
> 

The next number is 9.  { Like other famous series, the first two are only
                         there to initialize the series.  After that, add
                         2 to each previous entry. }

The next entry is 10.  { f(n) = f(n-1) + f(n-2) - (n-3) }
  (6th entry is 24.)

The next entry is 10.  { f(n) = f(n-1) + f(n-3) }
  (6th entry is 15.)

The next entry is 10.  { Series starts at 2.  For i starting at 1, create
                         i additional entries by adding i to the previous
                         entry. Series is:
    2  3  5  7  10  13  16  20  24  28  32  37  42  47  52  57  ...
     +1 +2 +2 +3  +3  +3  +4  +4  +4  +4  +5  +5  +5  +5  +5  +6 ...
     1x   2x      3x            4x                5x              ... }

So, I vote for 10, in that I've found three times as many ways to support
it as the 5th element in the series than any other number.

-- 
Kris Stephens     (408-746-6047)                 {whatever}!amdahl!krs
     [The opinions expressed above are mine, solely, and do not    ]
     [necessarily reflect the opinions or policies of Amdahl Corp. ]

krs@amdahl.UUCP (Kris Stephens) (04/12/85)

> 
> The next entry is 10.  { f(n) = f(n-1) + f(n-2) - (n-3) }
>   (6th entry is 24.)

Sorry, that should read "(6th entry is 14.)"

-- 
Kris Stephens     (408-746-6047)                 {whatever}!amdahl!krs
     [The opinions expressed above are mine, solely, and do not    ]
     [necessarily reflect the opinions or policies of Amdahl Corp. ]

gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (04/12/85)

> > 	What is the next number in the series
> > 		2, 3, 5, 7, ...
> > 
> 	I sure hope that the next number is 11. Primes, right?
> (Boy will I feel dumb if this isn't the right answer.)

My point was that there IS no "right answer".  Any of the following
could be the next number in the sequence:

9	The first element obviously reflects some sort of boundary
	condition (or is a typo) and subsequent ones are just the
	odd numbers

11	Primes, yes

none	These are the only four roots that the polynomial
		(x-2)(x-3)(x-5)(x-7)
	has

any	Depending on what fifth-degree polynomial one chooses

8	The starred exercises on p. 197 of a particular textbook

8	This is a list of the non-perfect positive integers

11	Order of finite groups having unique tables (same as
	the primes argument, but most people would need proof)

none	Insufficient information

any	It's just a game and it's now my turn to pick a number

...	And who says "..." isn't a number?

Appeals to simplicity do not help, since my first answer is
simpler in a strict formal sense than the "obvious" one.

You see, the more imaginative you are the less inclined you
are to settle for the answer that the testers wanted.  Perhaps
a better test of intelligence would be to see how long a list
of distinct answers with justifications you could produce.
(Please!  Do not clutter the net with extensions to this list!)

I am somewhat bitter about this since in a college board physics
test I found myself torn between providing the correct answers to
questions about relativity (my specialty) or the answers that they
obviously wanted.  And there have been a few recent cases
of high school students challenging SAT questions when the
students found better answers than the expected ones.  When I
was in high school I found myself in demand for competitions
and got to be quite good at puzzling out the thinking of the
testers -- not the ability the testing was intended to test!

dgary@ecsvax.UUCP (D Gary Grady) (04/15/85)

In a recent posting, Doug Gwyn writes (in reference to test questions):

> I am somewhat bitter about this since in a college board physics
> test I found myself torn between providing the correct answers to
> questions about relativity (my specialty) or the answers that they
> obviously wanted.  And there have been a few recent cases
> of high school students challenging SAT questions when the
> students found better answers than the expected ones.  When I
> was in high school I found myself in demand for competitions
> and got to be quite good at puzzling out the thinking of the
> testers -- not the ability the testing was intended to test!

Well said!!  I have had similar experiences.  My SAT scores were
astronomical, and some of my CLEP scores were literally off the scale.
I would dearly love to think this reflects my genius, but the truth is I
simply have a knack for test taking, and I understand the techniques
involved in "beating" the test.  (For example, on one CLEP exam in a
field with which I was totally unfamiliar, my preparation consisted of
borrowing a standard text and (the night before, so it was fresh in my
memory) reading the glossary and the chapter summaries.  Reading the
glossary alone would have been sufficient for a decent score.)

A former editor of GAMES magazine has written a book on test taking
called "How to Beat the SAT" or something.  He took the SAT and received
a respectable score without even looking at the questions (just the
answers).  Example:

a) 1.04  b) 10.5  c) 1.05  d) 2.1  e) 7.9

The correct answer is probably (c), since a, b, and d look like attempts
to catch probable erroneous answers (one off, off by multiple of 10 or
2).  Some brighter test constructors have learned to deal with this, but
there are some problems in designing multiple-choice tests that make
them of dubious value as a reliable instrument.  That doesn't stand in
the way of a powerful and wealthy testing mafia, however.

Several years ago a friend of mine was called in on the case of an
elementary school girl whose parents had been told the child needed help
in reading.  My friend discovered rapidly that the girl read quite well.
She was doing poorly because her remedial reading class was a crashing
bore.  She was put into a remedial group due to her poor showing on the
California Achievement Test (CAT).  Despite the efforts of my friend
(who has two masters degrees in fields directly related to the problem)
and a PhD educational psychologist (whose evaluation of the child
indicated an above average talent in both reading and math), the child
was kept in remedial reading classes.  One school official involved in
this bastardly decision justified it by appealing to the CAT as the
final authority.  "If it's not a good test," he demanded to know, "why
are we paying so much for it?"  Why, indeed.

Here at Duke we have a so-called Talent Identification Program which
involves selecting young students on the basis of SAT scores.  Responding
to criticism that even the Education Testing Service (which writes the
SAT) questions its validity in this application, the head honcho of the
project claimed an astronomical accuracy rate of better than 99% (and
this was not an off-the-cuff remark, but something in a published
paper I have a copy of).  Actually, I think the SATs in this instance do
indicate something:  they indicate that said head honcho belongs in a
home.

Even ETS carefully avoids claiming that the SAT is a reliable means of
evaluating individuals (as opposed to groups), and their claims even
there are restricted to predictions of freshman year performance (when
students in many institutions are taking mass courses graded by - guess
what - multiple choice tests).  I mentioned these facts to several other
folks here and was told I was nuts, that there HAD to be more to it than
that.  Fortunately I was able to give them copies of an article in
SCIENCE that detailed the modest claims ETS makes for SAT.  In fact,
when Ralph Nader's organization published an expose of the SAT, ETS's
reponse was to pooh-pooh the report and claim, "We've been saying that
all along."

Sorry to rant and rave so long, but this whole issue tends to make me
foam at the mouth!

-- 
D Gary Grady
Duke U Comp Center, Durham, NC  27706
(919) 684-3695
USENET:  {seismo,decvax,ihnp4,akgua,etc.}!mcnc!ecsvax!dgary

zmk04@udenva.UUCP (zmk04) (04/18/85)

> > > 	What is the next number in the series
> > > 		2, 3, 5, 7, ...
> > > 
> > 	I sure hope that the next number is 11. Primes, right?
> > (Boy will I feel dumb if this isn't the right answer.)
> 
> My point was that there IS no "right answer".  Any of the following
> could be the next number in the sequence:
> 
> 8	This is a list of the non-perfect positive integers

No it isn't.  Four does not equal one plus two.  Perfect numbers are the sums of their integral divisors.  Six is equal to one plus two plus three.  Twenty-eight is also perfect.

--Steve Blore, man of many dumb ideas and inventor of silly titles