EEVblog Electronics Community Forum

General => General Technical Chat => Topic started by: n45048 on March 24, 2015, 07:43:00 am

Title: Most Common Interview Questions
Post by: n45048 on March 24, 2015, 07:43:00 am
After reading one of those "news" articles today on some of the most common interview questions, it got me thinking about the jobs I've had in the past and some of the more ridiculous questions I've been asked in an interview.

I'd have to say one that immediately comes to mind was "If you were an animal, what animal would you be and why?" as if the interviewer had some weird degree in psychology and could tell everything anything about me based on my response.

Yeah, I've heard the argument that it's supposed to gauge the applicants ability to think on their feet. I call it a load of horse shit (maybe I should have answered "horse"). There is no right or wrong answer and the question is as meaningless as any response to it.

What unusual or crazy questions have you been asked?
Title: Re: Most Common Interview Questions
Post by: coppice on March 24, 2015, 07:54:31 am
If you were an animal, what animal would you be and why?
I would be a homo sapien, because I am the product of rumpy pumpy between two other homo sapiens.
Title: Re: Most Common Interview Questions
Post by: george graves on March 24, 2015, 10:40:37 am
Q: Do you work well under pressure?
A: I've been tested to withstand 14.7 PSI on a daily basis.
Title: Re: Most Common Interview Questions
Post by: German_EE on March 24, 2015, 10:40:46 am
"Where do you see yourself in X years time"?  The electronics industry changes from month to month and if I could predict five years into the future I would be playing the stock markets instead of attending job interviews.

"What is your greatest weakness"? Well, that would be my passionate desire for Sigorney Weaver's company, either that or my chronic kleptomania.

"What is your greatest strength"? Being able to answer silly interview questions without beating to death the person responsible.

"What is your favorite color"? Blood red, especially when lit by moonlight. Did you know that blood when lit by moonlight is quite black Mr Interviewer?

"What is your favorite computer language"? Solder (thank you Bob Pease)

"You’re in a desert walking along in the sand when all of the sudden you look down, and you see a tortoise, it’s crawling toward you. You reach down, you flip the tortoise over on its back. The tortoise lays on its back, its belly baking in the hot sun, beating its legs trying to turn itself over, but it can’t, not without your help. But you’re not helping. Why is that"? Because I like freshly roasted tortoise.

And now a real one......................

"The stock control system has crashed, the yard is filled with delivery trucks waiting to load up and nothing is moving in or out of the warehouse, what do you do"? The correct answer here is 'ask for help' because the company needs the system up and running as quickly as possible and delays will cost much more than emergency assistance from a qualified database administrator.
Title: Re: Most Common Interview Questions
Post by: george graves on March 24, 2015, 10:49:40 am
Here another read:  http://www.wired.com/2014/08/how-to-solve-crazy-open-ended-google-interview-questions/ (http://www.wired.com/2014/08/how-to-solve-crazy-open-ended-google-interview-questions/)
Title: Re: Most Common Interview Questions
Post by: Scrts on March 24, 2015, 10:58:32 am
I had a very interesting interview in Imagination Technologies when I had to solve how to save a game of chess using the minimum possible amount of bits in the memory.
Title: Re: Most Common Interview Questions
Post by: opty on March 24, 2015, 11:00:33 am
When they start asking questions like that I usually just leave, especially if it is my future boss who is asking. A job interview is as much about the candidate evaluating the company as it is about the company evaluating the candidate.

Being more on the software developer side I'm always put off when I'm asked to 'write a simple program doing...' during interview. I literally left once.

But then other people claim it is a good way of checking competencies.. (http://www.joelonsoftware.com/articles/fog0000000043.html (http://www.joelonsoftware.com/articles/fog0000000043.html))

I'm still waiting for the day when someone will ask me for my github user name.
Title: Re: Most Common Interview Questions
Post by: HighVoltage on March 24, 2015, 11:13:09 am
If someone would ask me such a question and takes it to that level, I would turn it around and ask the interviewer even stranger questions.
Title: Re: Most Common Interview Questions
Post by: T3sl4co1l on March 24, 2015, 01:26:11 pm
One I've heard of for EEs: a BJT, collector to +5, base to GND, emitter to -5 through a resistor.  Label all node voltages and currents.  Bonus points: note possible features, issues, instabilities, etc.

Another: basic op-amp (inv, NI) stages.  Design a gain of X, [non]inverting stage, etc.

Tim
Title: Re: Most Common Interview Questions
Post by: Marco on March 24, 2015, 01:29:20 pm
I had a very interesting interview in Imagination Technologies when I had to solve how to save a game of chess using the minimum possible amount of bits in the memory.

That's just nasty, real code or pseudo code with some hand waving?
Title: Re: Most Common Interview Questions
Post by: zapta on March 24, 2015, 03:28:35 pm
When they start asking questions like that I usually just leave

which suggests that the question is a good prima donnas filter. It's not about the answer, it's about the attitude.
Title: Re: Most Common Interview Questions
Post by: zapta on March 24, 2015, 03:35:05 pm
One I've heard of for EEs: a BJT, collector to +5, base to GND, emitter to -5 through a resistor.  Label all node voltages and currents.  Bonus points: note possible features, issues, instabilities, etc.

NPN or PNP?

I give extra points when the interviewee state explicitly the assumptions he uses.
Title: Re: Most Common Interview Questions
Post by: Neganur on March 24, 2015, 03:58:38 pm
And what does all this have to do with the tasks you're hired to do...?

I regularly scratch my head over those stories. I don't think I've ever heard one of those questions in an interview. It's either a real written test before you actually get interviewed or some very specific questions regarding the task they hire you for.
Title: Re: Most Common Interview Questions
Post by: FrankBuss on March 24, 2015, 04:58:27 pm
I'm still waiting for the day when someone will ask me for my github user name.
Once Google contacted me for hiring, and one reason they said was because of my Github projects. It was tempting to go to the interview, but being a freelancer is still better. But I told the recruiter that I'll contact him again when I don't get any more freelancer projects.
Title: Re: Most Common Interview Questions
Post by: corrado33 on March 24, 2015, 05:29:06 pm
Here another read:  http://www.wired.com/2014/08/how-to-solve-crazy-open-ended-google-interview-questions/ (http://www.wired.com/2014/08/how-to-solve-crazy-open-ended-google-interview-questions/)

I feel like if someone has to be taught how to guestimate, then they probably shouldn't be an engineer.  :)

This may be from my very limited job interview experience (went back to grad school for a reason.), but I get annoyed when people ask "What can you do for this company" for an entry level job. Honestly, nothing. You're going to do what you're told and complete menial tasks until you're promoted. You're not going to HELP the company at all, you're simply going to enable it to operate for as long as you work there. Now, that's a perfectly reasonable question for someone trying to land a higher position. I just think it's a way of coaxing awkward answers out of interviewees. "I uh... can uh... improve efficiencies with my light speed hands?"  :palm:
Title: Re: Most Common Interview Questions
Post by: Scrts on March 24, 2015, 10:58:50 pm
I had a very interesting interview in Imagination Technologies when I had to solve how to save a game of chess using the minimum possible amount of bits in the memory.

That's just nasty, real code or pseudo code with some hand waving?

No code required. Tell the number of bits. They want to see how you iterate each time and try to push for less bits. They're software company mostly, so expect to show that you're talented. Everything happens on a white board.
So:
1) there are 64 cells in the chess board and 6 different playable figures, plus you have to bear in mind, that there are empty cells. And of course black and white figures.
2) so at the beginning of the game you have 32 used cells and 32 empty cells. See where you can start to reduce the memory usage? SO begin with that...
3) Try to squeeze more
4) Even more...
5) And what's the result?

The interviewers work with you. They throw you some hints and check how you respond. They say, that they're interested how you work in a team and what questions do you ask your team?

I didn't perform well TBH, probably because it was my second interview that day or just I wasn't so smart on stress, however when going back on the train I've managed to come to a result of 120bits.

Can someone do better? :-//
Title: Re: Most Common Interview Questions
Post by: atferrari on March 25, 2015, 01:21:15 am
"Where do you see yourself in X years time"?  The electronics industry changes from month to month and if I could predict five years into the future I would be playing the stock markets instead of attending job interviews.

"What is your greatest weakness"? Well, that would be my passionate desire for Sigorney Weaver's company, either that or my chronic kleptomania.

"What is your greatest strength"? Being able to answer silly interview questions without beating to death the person responsible.

"What is your favorite color"? Blood red, especially when lit by moonlight. Did you know that blood when lit by moonlight is quite black Mr Interviewer?

"What is your favorite computer language"? Solder (thank you Bob Pease)

"You’re in a desert walking along in the sand when all of the sudden you look down, and you see a tortoise, it’s crawling toward you. You reach down, you flip the tortoise over on its back. The tortoise lays on its back, its belly baking in the hot sun, beating its legs trying to turn itself over, but it can’t, not without your help. But you’re not helping. Why is that"? Because I like freshly roasted tortoise.

And now a real one......................

"The stock control system has crashed, the yard is filled with delivery trucks waiting to load up and nothing is moving in or out of the warehouse, what do you do"? The correct answer here is 'ask for help' because the company needs the system up and running as quickly as possible and delays will cost much more than emergency assistance from a qualified database administrator.

Sense of humor or realistic? I enjoyed it anyway.
Title: Re: Most Common Interview Questions
Post by: ajb on March 25, 2015, 01:43:00 am
I didn't perform well TBH, probably because it was my second interview that day or just I wasn't so smart on stress, however when going back on the train I've managed to come to a result of 120bits.

Can someone do better? :-//

Okay, you managed to nerd snipe me for the last hour, but after getting stuck at 160, I gave up and consulted the internet.  According to people who know the rules of chess better than I do, the number of board positions is ~4x10^40, or ~135 bits, before accounting for pawn promotion (which I forgot you could even do!).   Some estimates are apparently even as high as 10^52 (175 bits), if you account for promotions.  How the heck do you get 120?
Title: Re: Most Common Interview Questions
Post by: helius on March 25, 2015, 02:42:54 am
But if the requirement is "save a game of chess", then a single board position isn't sufficient. That's because according to the rules, any past position can't be repeated more than twice.
Title: Re: Most Common Interview Questions
Post by: nctnico on March 25, 2015, 02:56:51 am
I'm still waiting for the day when someone will ask me for my github user name.
Once Google contacted me for hiring, and one reason they said was because of my Github projects. It was tempting to go to the interview, but being a freelancer is still better. But I told the recruiter that I'll contact him again when I don't get any more freelancer projects.
That is most likely the day recruiters won't be interested in you as well  >:D

The interviews I f*** up are usually the ones where they ask me questions with lots of specific jargon.
Title: Re: Most Common Interview Questions
Post by: Scrts on March 25, 2015, 08:51:24 am
I didn't perform well TBH, probably because it was my second interview that day or just I wasn't so smart on stress, however when going back on the train I've managed to come to a result of 120bits.

Can someone do better? :-//

Okay, you managed to nerd snipe me for the last hour, but after getting stuck at 160, I gave up and consulted the internet.  According to people who know the rules of chess better than I do, the number of board positions is ~4x10^40, or ~135 bits, before accounting for pawn promotion (which I forgot you could even do!).   Some estimates are apparently even as high as 10^52 (175 bits), if you account for promotions.  How the heck do you get 120?

I need to think around this again, just remembered that it was 120 AFAIK.
However, are you sure you're talking about chess and not checkers? I don't know chess rules to be honest...
Title: Re: Most Common Interview Questions
Post by: Rerouter on March 25, 2015, 09:38:00 am
another interesting one to an interveiw i have seen,

Q: hold your hand / arm out straight and keep your fingers as still as you can.

it was a test to rule out people with hands too shaky to solder SMD parts
Title: Re: Most Common Interview Questions
Post by: German_EE on March 25, 2015, 08:55:10 pm
For those of you who are curious about the interview questions I posted. All questions are real but the answers are from various sources:

"Where do you see yourself in X years time"?  Silly question, silly answer.

"What is your greatest weakness"? A very common question, I often incorporate Ms Weaver into an answer but I advise you not to mention kleptomania  :)

"What is your greatest strength"? Another common question, what the hell do they expect us to say?

"What is your favorite color"? I was asked this in an interview for Data General. The answer is a line from 'Manhunter' directed by Michael Mann (a rather good movie) but I advise you not to use it.

"What is your favorite computer language"? If interviewed for a hardware position 'solder' is the best answer you can give. It's got me at least two jobs, maybe more.

If you can't understand the turtle question you're probably a replicant. Stand by to be retired.

The final question was asked at my girlfriend's interview and "get help" was the answer she gave. She got the job.
Title: Re: Most Common Interview Questions
Post by: max666 on March 25, 2015, 11:18:13 pm
"If you were an animal, what animal would you be and why?"

I would say a circus lion, because then I would be able to enjoy jumping through ridiculous hoops, like answering interview questions on what animal I would like to be.

When I was studying, I applied for a part time job as a janitor and first thing the interviewer said was "You didn't send in a resume ...". Are you kidding me! You want my resume to see if I'm qualified to change light bulbs? ... bumptious idiot.
Worst thing is I got the job and also took the job  :palm:
Title: Re: Most Common Interview Questions
Post by: helius on March 25, 2015, 11:42:51 pm
In the not-too-distant future the interview will start by asking "Are you an android or a lesser, carbon-based life form?"
Title: Re: Most Common Interview Questions
Post by: T3sl4co1l on March 26, 2015, 03:46:23 pm
another interesting one to an interveiw i have seen,

Q: hold your hand / arm out straight and keep your fingers as still as you can.

it was a test to rule out people with hands too shaky to solder SMD parts

I'd fail that one due to arthritis but can do SMD soldering just fine. Why not ask to see examples of work instead?

19/20 applicants probably don't know what a soldering iron is.  What work?

If you've done SMT before, just mention it on your resume and bring it up in the interview.  This is why the interviewee can talk, too ;)
Title: Re: Most Common Interview Questions
Post by: zapta on March 26, 2015, 05:34:51 pm
another interesting one to an interveiw i have seen,

Q: hold your hand / arm out straight and keep your fingers as still as you can.

it was a test to rule out people with hands too shaky to solder SMD parts

Some jobs do require a steady hand

La tigresa del Oeste (https://www.youtube.com/watch?v=Xg2Z3yOReR0#)
Title: Re: Most Common Interview Questions
Post by: zapta on March 26, 2015, 08:39:59 pm
which suggests that the question is a good prima donnas filter. It's not about the answer, it's about the attitude.

If that's their idea of a crude personality test I'd rather not work there anyway, thanks. If their reaction to themselves being morons who don't know how to interview and couldn't be bothered to google some good questions is to think I'm a prima donna... It says more about them than me. With that kind of attitude (blame others for your own failings) it's usually best to avoid them.

which suggests that the question is a good prima donnas filter. It's not about the answer, it's about the attitude.

If that's their idea of a crude personality test I'd rather not work there anyway, thanks. If their reaction to themselves being morons who don't know how to interview and couldn't be bothered to google some good questions is to think I'm a prima donna... It says more about them than me. With that kind of attitude (blame others for your own failings) it's usually best to avoid them.

That's a convenient way to think of it. There is also the possibility that you are missing on good jobs because of dogma and inflexibly.

In my last job interview majority of the questions were open ended. How do you determine the temperature outside?, how many unemployment request are filed in the US every day?  What happens when you click on the Go button in a browser? How a computer process can communicate with another processes? It's like a Rorschach test that allows to guage your attitude, knowledge, and ability to think outside the box and handle situations and uncertainty.
Title: Re: Most Common Interview Questions
Post by: zapta on March 27, 2015, 12:47:36 am
Don't let your dogma costing you good jobs.
Title: Re: Most Common Interview Questions
Post by: sean0118 on March 27, 2015, 03:12:39 am
I'd have to say one that immediately comes to mind was "If you were an animal, what animal would you be and why?" ...

I was asked that by a well known telecommunications company. I said dog, because I have a dog and it seems like she has a pretty good life. I don't think that was the answer they were looking for, but I didn't really want the job, just interview experience. Anyway, everyone else was giving lame answers like a cat because they were so independent or an eagle because they are so good at keeping an eye on things...     ::)
Title: Re: Most Common Interview Questions
Post by: mtdoc on March 27, 2015, 05:12:28 am
Having interviewed many people over the years - from technical staff for a science lab to medical staff and physicians, you learn to identify candidates who are just tryng to give the answer they think you want. For any job requiring independent, creative thinking, those kind if candidates score poorly.

The point about the interview also being about the job candidate interviewing the employer is also on the money IME - at least for anything but the most menial type of work.

Hearing some of these sort of pop psychology questions engineers are being asked amazes me. I can't believe someone employing an engineer actually finds value in those kind of questions.
Title: Re: Most Common Interview Questions
Post by: Seekonk on March 28, 2015, 10:18:32 am
I'm out of the system now.  I remember having an interview that went well and was called back for a second one.  Thought they wanted to talk price.  Instead, I was led to a room and handed a psyc test. You know..... What would you like to do best on a sunny day:  A. Wear women's clothes, B. Kill your mother, C. Have tea with your cat.  To top it off, this was a timed test and I didn't bring my reading glasses.  I probably wanted to look like I could read small parts without assistance.  The usual test taking terror set in and squinting to read the questions got my eyes watering.  I could barely get through half the questions.  Never heard from them again.  They must have thought I was slow witted.
Title: Re: Most Common Interview Questions
Post by: German_EE on March 28, 2015, 12:10:42 pm
I forget which company it was but I had a psychological test once and this one was all yes/no answers asking if I agreed with a particular statement. After thirty seconds someone asked what I was doing and they were quite surprised to find me going through the paper marking all the statements I agreed with first (I then planned to go back and mark the other statements as disagree). Nobody had done the test that way before.

One of the questions was "Do you believe in UFOs"? which I marked as "To be discussed". I then had to explain the difference between a UFO and flying saucers full of little green men to the interview panel. Hint: If you see something in the sky that you cannot recognize then, by definition, you have seen a UFO.
Title: Re: Most Common Interview Questions
Post by: photon on March 28, 2015, 07:11:30 pm
True story. After a long and tiring day of interviews, an interviewer asked me what my greatest weakness was. I answered that I did not like people. I still received an offer, which shows that you can be an engineer and a sociopath.
Title: Re: Most Common Interview Questions
Post by: photon on March 28, 2015, 07:31:56 pm
I didn't perform well TBH, probably because it was my second interview that day or just I wasn't so smart on stress, however when going back on the train I've managed to come to a result of 120bits.

Can someone do better? :-//

Okay, you managed to nerd snipe me for the last hour, but after getting stuck at 160, I gave up and consulted the internet.  According to people who know the rules of chess better than I do, the number of board positions is ~4x10^40, or ~135 bits, before accounting for pawn promotion (which I forgot you could even do!).   Some estimates are apparently even as high as 10^52 (175 bits), if you account for promotions.  How the heck do you get 120?
You can use probabilites to reduce the number of bits required to encode an outcome. So, in the example you give of 4*(10^40) =~ 2^135 outcomes, you will need 135 bits only if each of the outcomes is equiprobable. However, if this is not the case, then you can reduce the number of bits required to the entropy of the source. This is Shannon's first theorem and the basis for all lossless compression. 
Title: Re: Most Common Interview Questions
Post by: helius on March 28, 2015, 11:18:43 pm
True story. After a long and tiring day of interviews, an interviewer asked me what my greatest weakness was. I answered that I did not like people. I still received an offer, which shows that you can be an engineer and a sociopath.
The word for that is "introverted". Sociopathy is a lack of conscience, emotional manipulation, fabricating exactly what others want to hear, and very easy lying. Your boss and your congressman are probably sociopaths.
Title: Re: Most Common Interview Questions
Post by: photon on March 29, 2015, 12:02:25 am
True story. After a long and tiring day of interviews, an interviewer asked me what my greatest weakness was. I answered that I did not like people. I still received an offer, which shows that you can be an engineer and a sociopath.
The word for that is "introverted". Sociopathy is a lack of conscience, emotional manipulation, fabricating exactly what others want to hear, and very easy lying. Your boss and your congressman are probably sociopaths.
When I was at school I had a professor who was at Michigan with Ted Kaczynski where they both did a PhD. When I told my wife this she really liked to kid me that she was going to turn me in as the Unabomber. I think she was joking. BTW, I am also joking.
Title: Re: Most Common Interview Questions
Post by: mikeselectricstuff on March 29, 2015, 11:06:21 am
I had a very interesting interview in Imagination Technologies when I had to solve how to save a game of chess using the minimum possible amount of bits in the memory.

I wonder if they ware also looking for a more complete answer - e.g. there is no point squeezing the last few bits if it needs a ton of extra code. The wording of the question could be taken to include memory used by the encode/decode process.
For a software company, a good answer ought to be something that is simple, easy to understand and easy to show it works, even if it isn't necessarily the most efficient.
Maybe all they were doing was looking for someone to dig further into their incomplete specification of requirements.


Title: Re: Most Common Interview Questions
Post by: bookaboo on March 29, 2015, 11:42:31 am
True story. After a long and tiring day of interviews, an interviewer asked me what my greatest weakness was. I answered that I did not like people. I still received an offer, which shows that you can be an engineer and a sociopath.

https://www.youtube.com/watch?v=KAPOEHMrL5U (https://www.youtube.com/watch?v=KAPOEHMrL5U)

Language maybe nsfw
Title: Re: Most Common Interview Questions
Post by: AndyC_772 on March 29, 2015, 12:02:19 pm
For the chess game question, I'd be looking for the candidate to talk through some considerations, even if there's no definitive conclusion. Things like:

- how many different kinds of piece are there, and therefore, how many bits are required to encode them all?

- given that the number of each piece at the start of the game is fixed, is it more efficient to consider an indexed solution? (ie. record the position of each piece in terms of its numbered square, rather than encode each square individually).

- in the latter case, how do you cope with pawn promotion? Is it necessary to add extra bits for this, or is it OK not to be able to cope with (say) multiple queens, if the memory saving thus achieved is worth it?

- what's more important, the total memory usage of 1 game, or the average memory usage over a large number of games?

- is the code space included in the total? How about an arbitrarily large look-up table? Or at least, a custom LZW entropy coding table?

- given that all identical pieces are interchangeable, is there a saving to be had in the indexed case by sorting the pawns by some criterion before compressing the table?
Title: Re: Most Common Interview Questions
Post by: zapta on March 29, 2015, 10:50:43 pm
For the chess state, ignoring history information, my *theoretical* approached would be along these lines, define an order among all the valid states and assign each a sequential number. This will be the minimum number of bits assuming even distribution of states and encoding time is O(1) because the number of states is fixed.
Title: Re: Most Common Interview Questions
Post by: helius on March 30, 2015, 12:53:37 am
for a fixed input size, any algorithm is O(1)  :palm:
Title: Re: Most Common Interview Questions
Post by: zapta on March 30, 2015, 01:31:42 am
for a fixed input size, any algorithm is O(1)  :palm:

Optimal encoding, optimal time complexity, problem solved, when do I start the job?
Title: Re: Most Common Interview Questions
Post by: HackedFridgeMagnet on March 30, 2015, 01:56:31 am
Quote
Optimal encoding, optimal time complexity, problem solved, when do I start the job?
When you work out how many valid states there are.  ;)
Title: Re: Most Common Interview Questions
Post by: zapta on March 30, 2015, 07:56:40 am
Quote
Optimal encoding, optimal time complexity, problem solved, when do I start the job?
When you work out how many valid states there are.  ;)

O(1),  my professor said that constants do no matter.
Title: Re: Most Common Interview Questions
Post by: KJDS on March 30, 2015, 09:02:44 am
When interviewing people I want to know if they have common sense and a sense of humour as much as their technical competence.
Title: Re: Most Common Interview Questions
Post by: Tallie on March 30, 2015, 09:38:42 pm
When interviewing people I want to know if they have common sense and a sense of humour as much as their technical competence.
Right. Some things you can learn, some things you can't...
Title: Re: Most Common Interview Questions
Post by: sean0118 on June 11, 2015, 01:09:07 pm
Out of interest how do people answer these types of questions:

'How would peers/family/colleagues describe you?'


The two phrases that leap into my mind are 'Very good thank you' and 'Why don't you ask them yourself?'.

But I'm guessing those as responses wouldn't help land a job...    ::)
Title: Re: Most Common Interview Questions
Post by: KJDS on June 11, 2015, 01:48:34 pm
Out of interest how do people answer these types of questions:

'How would peers/family/colleagues describe you?'


The two phrases that leap into my mind are 'Very good thank you' and 'Why don't you ask them yourself?'.

But I'm guessing those as responses wouldn't help land a job...    ::)

"Technically brilliant, with a great sense of humour, lots of common sense and boundless energy, but not very good at answering lazy interview questions"
Title: Re: Most Common Interview Questions
Post by: glynd on June 11, 2015, 08:05:12 pm
I didn't perform well TBH, probably because it was my second interview that day or just I wasn't so smart on stress, however when going back on the train I've managed to come to a result of 120bits.

Can someone do better? :-//

Okay, you managed to nerd snipe me for the last hour, but after getting stuck at 160, I gave up and consulted the internet.  According to people who know the rules of chess better than I do, the number of board positions is ~4x10^40, or ~135 bits, before accounting for pawn promotion (which I forgot you could even do!).   Some estimates are apparently even as high as 10^52 (175 bits), if you account for promotions.  How the heck do you get 120?
You can use probabilites to reduce the number of bits required to encode an outcome. So, in the example you give of 4*(10^40) =~ 2^135 outcomes, you will need 135 bits only if each of the outcomes is equiprobable. However, if this is not the case, then you can reduce the number of bits required to the entropy of the source. This is Shannon's first theorem and the basis for all lossless compression.

Just having a play, I figure that you can encode the whole lot in 192 bits (including multiple pieces the same)
Using an initial 64bit bitmap to list the occupied spaces, and then 4 bits to represent the pieces used in turn.

Managed to knock off another 30 or so bits by playing around with some RLE ideas, but that's as low as I got in a quick play
Title: Re: Most Common Interview Questions
Post by: helius on June 11, 2015, 09:11:53 pm
If you care about correctness, you must record each move. Simply knowing the configuration at a single point in time is not enough to resume a game while following all of the rules of chess.
With the initial set of pieces, there are 143 possibilities at each turn , although not all of them are legal. That's 7.160 bits per turn. Pawn promotion adds another layer of fun, because even though promotion is almost always to a queen, it is legal to promote to any other piece besides the king.
Title: Re: Most Common Interview Questions
Post by: sean0118 on June 12, 2015, 05:25:09 am
"Technically brilliant, with a great sense of humour, lots of common sense and boundless energy, but not very good at answering lazy interview questions"

haha yeah, I think what I need is a book of HR buzz words...      ::)
Title: Re: Most Common Interview Questions
Post by: GK on June 12, 2015, 05:45:24 am
Sounds not unlike 98% of internet dating profiles; especially those of the women from Thailand and the Federation of Russia that keep filling my inbox.  :palm:
Title: Re: Most Common Interview Questions
Post by: helius on June 06, 2017, 04:11:30 am
On the subject of chess games, Numberphile has a nice video:
https://www.youtube.com/watch?v=Km024eldY1A (https://www.youtube.com/watch?v=Km024eldY1A)

The problem of counting chess games (and therefore, how to encode them) is a fairly old one.
Using the restriction that all games must follow the rules, the space is multiplied at each ply by all the legal moves available to the player at that time. A state machine can enumerate those possibilities in a defined order, which yields a residue for that move that we can then add to get a longer number encoding the state of the game.

Code: [Select]
Integer state = 0
For each move n do:
    state = state*CountLegalMoves(state) + IndexOfMove(state,newMove)
End;

You need to allow for players resigning as a legal move, otherwise the reason for termination is unknown.
Title: Re: Most Common Interview Questions
Post by: Muxr on June 06, 2017, 06:10:39 am
I had a very interesting interview in Imagination Technologies when I had to solve how to save a game of chess using the minimum possible amount of bits in the memory.
I like those type of questions. By the way often times it is not about knowing the best possible answer. It's about demonstrating your thought process. It might take you some time perhaps to come up with the most optimized solution, but showing that you have a methodical approach to solving the problem is often what they are going after.
Title: Re: Most Common Interview Questions
Post by: jeroen79 on June 06, 2017, 01:51:51 pm
This may be from my very limited job interview experience (went back to grad school for a reason.), but I get annoyed when people ask "What can you do for this company" for an entry level job. Honestly, nothing. You're going to do what you're told and complete menial tasks until you're promoted. You're not going to HELP the company at all, you're simply going to enable it to operate for as long as you work there. Now, that's a perfectly reasonable question for someone trying to land a higher position. I just think it's a way of coaxing awkward answers out of interviewees. "I uh... can uh... improve efficiencies with my light speed hands?"  :palm:
Why would that be an annoying question?
Obviously they are not asking about how you would change the company's 5-year strategy.
But that doesn't mean that you cannot add value to the company.

Surely you have strengths that are beneficial for them beyond doing what you're told to do.

What makes you suitable for the job you're applying for? How would they benefit from hiring you?
And if you plan to move on to a higher job, what job are you aiming for?
How would you benefit the company in that position?
Title: Re: Most Common Interview Questions
Post by: GK on June 06, 2017, 02:05:46 pm
I'd have to say one that immediately comes to mind was "If you were an animal, what animal would you be and why?" as if the interviewer had some weird degree in psychology and could tell everything anything about me based on my response.


I have my answer for this question, just in case I'm ever asked.

Argentine Lake Duck:

http://www.abc.net.au/science/articles/2001/09/14/366856.htm (http://www.abc.net.au/science/articles/2001/09/14/366856.htm)
Title: Re: Most Common Interview Questions
Post by: Marco on June 06, 2017, 05:51:09 pm
You can use probabilites to reduce the number of bits required to encode an outcome. So, in the example you give of 4*(10^40) =~ 2^135 outcomes, you will need 135 bits only if each of the outcomes is equiprobable. However, if this is not the case, then you can reduce the number of bits required to the entropy of the source. This is Shannon's first theorem and the basis for all lossless compression.

Pigeon hole principle still applies. Shannon would only apply if you wanted to store/transmit a random position and wanted to know the average number of bits.

With lossless compression unlikely data is expanded.
Title: Re: Most Common Interview Questions
Post by: ZeTeX on June 06, 2017, 07:36:48 pm
Out of interest how do people answer these types of questions:

'How would peers/family/colleagues describe you?'


The two phrases that leap into my mind are 'Very good thank you' and 'Why don't you ask them yourself?'.

But I'm guessing those as responses wouldn't help land a job...    ::)
I'd describe myself as a professional idiot.