Results 1 to 6 of 6
Like Tree2Thanks
  • 1 Post By johng
  • 1 Post By HallsofIvy

Math Help - div operator proof

  1. #1
    Newbie
    Joined
    Jan 2013
    From
    Pennsylvania
    Posts
    23

    div operator proof

    Don't tell me the whole answer...I just need a hint, I guess.

    I'm supposed to prove that a div b is non-negative when a and b have the same sign, and non-positive when they have different signs.

    Am I on the right track with this (this is just the first case I'm supposed to consider)?

    Case 1. Assume a ≥ 0 and b < 0. rb ≥ 0, so r ≤ 0.



    Then a div b = q = (a - r) / b


    Since r ≤ 0 and a ≥ 0, a div b can be rewritten as ( |a|+ |r| ) / b


    Since b < 0, a div b can be rewritten as (-1)( |a|+ |r| ) / |b|



    Since ( |a|+ |r| ) / |b| is non-negative, the value a div b is non-positive in this case.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    3,879
    Thanks
    697

    Re: div operator proof

    Hey euphony.

    Are these vectors a and b vector-valued functions? If so what constraints do they have (i.e. to make them positive)?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member
    Joined
    Dec 2012
    From
    Athens, OH, USA
    Posts
    662
    Thanks
    274

    Re: div operator proof

    Hi,
    What is the div operator? Do you mean integer division in a programming language? If so, the most common definition (Java, C and Python) is for integers a and b with b not 0, a div b = sgn(a)*sgn(b)*floor(|a|/|b|). That is, a div b is truncated toward 0. Examples 5 div 2 = 2 but -5 div 2 is -2, not floor(-5/2) = -3. If this is what you mean by div, there's really nothing to prove??
    Thanks from topsquark
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Jan 2013
    From
    Pennsylvania
    Posts
    23

    Re: div operator proof

    a div b means the quotient of a divided by b. So floor(a/b).
    It seems obvious that something negative divided by something positive will equal something negative and so forth, but I'm not sure how I would prove that without already assuming it's true in the proof.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor

    Joined
    Apr 2005
    Posts
    16,038
    Thanks
    1675

    Re: div operator proof

    Have you already proved, or can you use, the fact that the product of two numbers with the same sign is positive and the product of two numbers with opposite sign is negative?

    Is so, I suggest a "proof by contradiction". Suppose a and b are both positive and x= a div b is negative. You can write a= bx+ r where 0\le r< 1 (do you understand that?). Now b is at least 1 so if x is negative, bx is at least -1.
    Thanks from topsquark
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Jan 2013
    From
    Pennsylvania
    Posts
    23

    Re: div operator proof

    Have you already proved, or can you use, the fact that the product of two numbers with the same sign is positive and the product of two numbers with opposite sign is negative?
    The only relevant thing I can find that we proved is (-a)(-b) = ab. That doesn't assume that a and b have the same sign, but could I use it?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Matrix of a Nilpotent Operator Proof
    Posted in the Advanced Algebra Forum
    Replies: 4
    Last Post: March 29th 2011, 11:03 PM
  2. Linear operator proof
    Posted in the Advanced Algebra Forum
    Replies: 4
    Last Post: March 20th 2011, 10:30 PM
  3. Linear operator proof
    Posted in the Advanced Algebra Forum
    Replies: 5
    Last Post: March 27th 2010, 04:16 AM
  4. Proof with the nabla operator
    Posted in the Calculus Forum
    Replies: 2
    Last Post: November 16th 2009, 03:08 AM
  5. linear operator proof
    Posted in the Advanced Algebra Forum
    Replies: 2
    Last Post: October 11th 2009, 11:36 AM

Search Tags


/mathhelpforum @mathhelpforum