Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Lv 2324 points

Jesus

Favorite Answers10%
Answers62
  • Which goalie do I start? Fantasy hockey?

    I have one slot:

    Kari Lehtonen vs Florida or Pekka Rinne vs. St. Louis?

    Obviously Rinne is the better goalie, but does the match up make Lehtonen the better start?

    1 AnswerHockey8 years ago
  • Which goalie do I start today?

    I have one slot:

    Kari Lehtonen vs Florida or Pekka Rinne vs. St. Louis?

    Obviously Rinne is the better goalie, but does the match up make Lehtonen the better start?

    1 AnswerFantasy Sports8 years ago
  • How to make a VERY SIMPLE makefile c++. Please help!?

    Hey guys, I have one simple file, call it "file.cpp" and I need to make a makefile for it so that the file runs when I type "make -f run". How would I do this?

    1 AnswerProgramming & Design8 years ago
  • Need help with some induction. Please help?

    Got a test coming up, and I need some help with a practise question... Need to prove this by induction:

    Reccurence relation: m(i) = m(i-1) + m(i - 3) + 1, for all i >= 3

    Initial conditions: m(0) = 1, m(1) = 2, m(2) = 3

    Prove m(i) >= 2^(i/3)

    (note: m(i) means i is subscript to m)

    Here is what I have so far:

    --------------------------------------------------------------------------------------------------------------

    Base case: m(3) >= 2 -----> 5 >= 2. Therefore it holds for the base case.

    Induction Hypothesis: Assume there is a k such that m(k) >= 2^(k/3) holds.

    Now I must prove that it holds for k+1.

    So we have: m(k+1) >= 2^((k+1)/3)

    which equals (by substituting hypothesis):

    m(k) + m(k-2) + 1 >= 2^((k+1)/3)

    ----------------------------------------------------------------------------------------------------------------

    This is where I am stuck. I'm not sure where to go from here. Any help will be appreciated. Thanks guys!

    1 AnswerMathematics10 years ago
  • Need help with simple induction proof... 10 pts!?

    Got a test coming up, and I need some help with a practise question... Need to prove this by induction:

    Reccurence relation: m_i = m_(i-1) + m(i - 3) + 1, i >= 3

    Initial conditions: m_0 = 1, m_1 = 2, m_2 = 3

    Prove m_i >= 2^(i/3)

    (note: m_i means i is subscript to m)

    Thanks guys!

    2 AnswersMathematics10 years ago
  • Math sequence question.. please help! 10 pts!!!?

    Hey guys, I need some help trying to figure out how to get the summation of a sequence.

    The sequence is "T_x = 2 - 1/x" Here "T_x" just means T to the subscript x.

    I need the summation of this from x=2 to n. Any ideas? Thanks. I do believe its an arithmetic sequence.

    1 AnswerMathematics10 years ago
  • How to show simple binary operator in first order logic?

    Hey guys, I'm just a little confused on how I express binary operators in first order logic.

    Heres the question:

    -------------------------------------------------------------------

    Let G be a set and " * " a binary operator on G.

    Show the following statement in first order logic:

    for all f,g ∈ G, (f * g) is an element of G.

    -----------------------------------------------------------------

    I defined set(x) to be true if and only if x is an element of G.

    This is how I started the answer:

    ∀f ∀g ( set(f) (and) set(g) ----->

    How do I express the binary operator here?

    Thanks for any help!

    1 AnswerMathematics1 decade ago
  • How do I express this in first order logic?

    Hey guys, I need some help translating this into first order logic.

    --------------------------------------------------------------------------

    Let G be a set and " * " a binary operator on G.

    Show the following statement in first order logic:

    for all f,g ∈ G, (f * g) is an element of G.

    ------------------------------------------------------------------

    1 AnswerMathematics1 decade ago
  • What is wrong with this copy constructor for a very basic singly linked list?

    Without the copy constructor, my program works fine. I can declare as many empty or singleton strSets as I want and output their value without a problem in my main program. As soon as I put in the copy constructor, if I declare more than 2 sets, i get Segmentation Fault. Also, if I declare two sets and try to output the value of either, I get Segmentation Fault. If theres only one set declare it works fine. I'll need the copy constructor for when I implement the rest of my program obv, but if it doesnt work here, but it would work later on either. Heres the code:

    --------------------------------------------------------------------------------

    **Here is the implementation of the class strSet.h**

    #ifndef _STRSET_

    #define _STRSET_

    #include <iostream>

    #include <vector>

    #include <string>

    struct node {

    std::string s1;

    node * next;

    };

    class strSet {

    private:

    node * first;

    public:

    strSet (); // Create empty set

    strSet (std::string s); // Create singleton set

    strSet (const strSet ©); // Copy constructor

    // will implement destructor and overloaded assignment operator later

    void output() const;

    }; // End of strSet class

    #endif // _STRSET_

    ------------------------------------------------------------------------------

    **And heres the implementation strSet.cpp**

    #include <iostream>

    #include <vector>

    #include <string>

    #include "strset2.h"

    using namespace std;

    strSet::strSet() {

    first = NULL;

    }

    strSet::strSet(string s) {

    node *temp;

    temp = new node;

    temp->s1 = s;

    temp->next = NULL;

    first = temp;

    }

    strSet::strSet(const strSet& copy) {

    cout << "copy-cst\n";

    node *n = copy.first;

    node *prev = NULL;

    while (n) {

    node *newNode = new node;

    newNode->s1 = n->s1;

    newNode->next = NULL;

    if (prev) {

    prev->next = newNode;

    }

    else {

    first = newNode;

    }

    prev = newNode;

    n = n->next;

    }

    }

    void strSet::output() const {

    if(first == NULL) {

    cout << "Empty set\n";

    }

    else {

    node *temp;

    temp = first;

    while(1) {

    cout << temp->s1 << endl;

    if(temp->next == NULL) break;

    temp = temp->next;

    }

    }

    }

    1 AnswerProgramming & Design1 decade ago
  • How to implement copy constructor for very simple singly linked list in C++?

    I am having quite a bit of difficulty understanding how to implement a copy constructor for a singly linked list in C++. Heres is the code I have for the implementation:

    --------------------------------------…

    struct node {

    string value;

    node * next;

    };

    class strSet {

    private:

    node * first //points to the first node of the object;

    public:

    ...

    strSet (const strSet& copy);

    ...

    };

    --------------------------------------…

    I am having difficulty implementing this copy constructor. Can anyone shed some light? I'm not sure what to put in the body.

    strSet (const strSet& copy) {

    ...

    }

    The other public member functions don't relate to the copy constructor. I'm suppose to do a deep copy manually.

    Do I need to make 1 or 2 temp variables? I know I need one that goes through the list we're copying from because we don't want to change the original variable.

    1 AnswerProgramming & Design1 decade ago
  • Copy constructor for very simple singly linked list (C++)?

    I am having quite a bit of difficulty understanding how to implement a copy constructor for a singly linked list in C++. Heres is the code I have for the implementation:

    --------------------------------------…

    struct node {

    string value;

    node * next;

    };

    class strSet {

    private:

    node * first //points to the first node of the object;

    public:

    ...

    strSet (const strSet& copy);

    ...

    };

    --------------------------------------…

    I am having difficulty implementing this copy constructor. Can anyone shed some light? I'm not sure what to put in the body.

    strSet (const strSet& copy) {

    3 AnswersProgramming & Design1 decade ago
  • Copy constructor for very simple singly linked list?

    I am having quite a bit of difficulty understanding how to implement a copy constructor for a singly linked list. Heres is the code I have for the implementation:

    -------------------------------------------------------

    struct node {

    string value;

    node * next;

    };

    class strSet {

    private:

    node * first;

    public:

    ...

    strSet (const strSet& copy);

    ...

    };

    ------------------------------------------------------

    I am having difficulty implementing this copy constructor. Can anyone shed some light? I'm not sure what to put in the body.

    strSet (const strSet& copy) {

    if( copy->first == NULL) first = NULL;

    .....

    2 AnswersProgramming & Design1 decade ago
  • Need help with a proof... Please help! 10 pts!!?

    Hey, I'm doing some review for my Combinatorics class at University... and I'm having trouble figuring out how to do this proof. Heres the question:

    --------------------------------------…

    Prove that, for every non-negative integer n,

    [ ((1 - 3*i) / 2) * (1 + i)^n ] + [ ((1 + 3*i) / 2) * (1 - i)^n ]

    is an integer.

    --------------------------------------…

    Please note that ' i ' means Complex (imaginary number). My prof said theres a few ways to solve this. I tried some induction but I got stuck. Any ideas? Thanks for any support!

    1 AnswerPhysics1 decade ago
  • Binary string decomposition question... please help!! 10 pts?

    Hi, I need some help figuring out how to do something with binary string composition. Here is an example of what i mean:

    The binary string composition of all binary strings in which each '0' is immediately followed by a '1' is :

    (1)* ( (01) (1)* )*

    ---------------------------------

    I have a question that asks for the decomposition where each block of '0's is followed by the same amount of '1' s. How do you do something like putting the same amount of 1's and 0's?

    2 AnswersPhysics1 decade ago
  • Binary string decomposition question... please help! 10 pts?

    Hi, I need some help figuring out how to do something with binary string composition. Here is an example of what i mean:

    The binary string composition of all binary strings in which each '0' is immediately followed by a '1' is :

    (1)* ( (01) (1)* )*

    ---------------------------------

    I have a question that asks for the decomposition where each block of '0's is followed by the same amount of '1' s. How do you do something like putting the same amount of 1's and 0's?

    Thanks.

    2 AnswersMathematics1 decade ago
  • Sequence question... Can anyone help please? 10 pts?

    Okay, I have a practice questions I need help with to study for my exam. It deals with a defined sequence.

    We define the sequence like this (where "_" means subscript) :

    S_n = 2*S_(n-1) + S_(n-2) - S_(n-3)

    S_0 = 1

    S_1 = 2

    S_3 = 5

    The question I need to do is:

    Prove: " S_n > 2^(n+1) " for n > 4

    --------------------------------------…

    I know that I need to substitute the formula for both sides, but I'm really confused how to prove this. Do I have to use induction? Can anyone help? Thanks!

    1 AnswerMathematics1 decade ago
  • Fibonacci sequence question.. please help! 10pts!?

    Okay, I have a practice questions I need help with to study for my exam. It deals with the fibonacci sequence.

    We define the sequence like this (where "_" means subscript) :

    F_0 = 0

    F_1 = 1

    F_n = F_(n-1) + F_(n-2)

    The question I need to do is:

    Prove: " F_n > F_(n-1) "

    ---------------------------------------------

    I know that I need to substitute the formula for both sides, but I'm really confused how to prove this. Can anyone help? Thanks!

    1 AnswerMathematics1 decade ago
  • Should I make this trade in fantasy basketball?

    I'm giving up: Monta Ellis, Nene, and Wesley Matthews

    Getting: Kevin Love, Jrue Holiday, Dorell Wright

    I'm first in points, and steals, 2nd last in rebounds, not so good in assits, and decent in 3pters

    4 AnswersFantasy Sports1 decade ago
  • Need help with simple 4:2 priority encoder and boolean equation?

    Hey, I'm having some difficulty understanding how I would derive the boolean equations for V, A0, and A1 for this 4:2 priority encoder.

    http://teahlab.com/Combinational/encoders/fourInpu...

    V = D0 + D1 + D2 + D3

    A0 = D1+ D3

    A1 = D2 + D3

    seems way to simple. Can someone help me out? Thanks.

    1 AnswerEngineering1 decade ago
  • Need help with simple 4:2 priority encoder and boolean equation?

    Hey, I'm having some difficulty understanding how I would derive the boolean equations for V, A0, and A1 for this 4:2 priority encoder.

    http://teahlab.com/Combinational/encoders/fourInpu...

    V = D0 + D1 + D2 + D3

    A0 = D1+ D3

    A1 = D2 + D3

    seems way to simple. Can someone help me out? Thanks.

    1 AnswerEngineering1 decade ago