Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 710369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:36:47+00:00 2026-05-14T04:36:47+00:00

I came across this question: say given two weights 1 and 3, u can

  • 0

I came across this question: say given two weights 1 and 3, u can weigh 1,2 (by 3-1),3,4 (by 3+1) (using both sides of balance). Now find the minimum number of weights so that you can measure 1 to 1000.

So the answer was 1,3,9,27…

I want to know how do you arrive at such a solution means powers of 3. What is the thought process?

Source: http://classic-puzzles.blogspot.com/search/label/Google%20Interview%20Puzzles

Solution: http://classic-puzzles.blogspot.com/2006/12/solution-to-shopkeeper-problem.html

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:36:47+00:00Added an answer on May 14, 2026 at 4:36 am

    Theorem: You’ll need weights 3^0 through 3^N to cover values 1 through S(N) = sum(3^i) for i = 0 to N.

    Proof:

    1. You’ve given the base case where N = 1.
    2. Now assume this holds for N < M. For the case N = M we’ll have weights 3^0=1 through 3^M which we already know covers values up to S(M-1). Consider that by trading sides for each weight on the scale we can express all negative values down to -S(M-1) with these same weights as well. This it will be sufficient to prove that we can express values S(M-1) + 1 through S(M) as 3^M + X where -S(M-1) <= X <= S(M-1). But S(M) = S(M-1) + 3^M so this is clear provided that S(M-1) + 1 >= 3^M – S(M-1). That is, if 3^M <= 1 + 2 * S(M-1) = 1 + sum(2 * 3^i) for i = 0 to M-1. This seems clear to me at the moment, but I’ve had a few cocktails and a proof wasn’t really what you were asking for anyway, so I’ll leave this final step as an exercise to the reader.
    3. By induction, QED.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I came across this question on an interview website - We are given 4
I came across this question on an interview questions thread. Here is the question:
I came across this question after searching for a ODBC or JDBC. To my
I came across this question on transcender: What should you apply to a field
I came across this question on a website. As mentioned there, it was asked
Today I came across this question: you have a code static int counter =
I am preparing for my interview and came across this question: Consider that i
While looking at some conceptual questions in C,I came across this question in a
I recently came across a question about sequence points in C++ at this site,
I came across this question about memory management of dictionaries, which mentions the intern

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.