Recent content by tawi

  1. T

    C/C++ Rewriting C/ C++ code in Pascal

    It should do this: http://d1gjlxt8vb0knt.cloudfront.net//wp-content/uploads/NewPermutation.gif But for some reason the string suddenly starts to elongale, shorten...
  2. T

    C/C++ Rewriting C/ C++ code in Pascal

    Yes, I am an idiot. So far I have done this but the swap function is not working properly.. Not sure why. permu(output); function swap(str: String; firstIndex: Integer; secondIndex: Integer): String; var tmp : Char; begin tmp:=str[firstIndex]; str[firstIndex]:=str[secondIndex]...
  3. T

    C/C++ Rewriting C/ C++ code in Pascal

    Hello, I have a code in C/ C++and I have just learned I am going to need it in a version compatible with Free Pascal. I would never bother anyone with it but as I need it pretty quickly and my knowledge of Pascal is very poor I would spend ages rewriting this and it probably woudn't even work at...
  4. T

    Linear algebra - vector spaces, bases

    You mean writing ##ax^3 + bx^2 + cx + d = p## which will give us system of four equations with the same LHS and RHS will always be the result for the individual elements of the basis? So the first equation would be ##ax^3 + bx^2 + cx + d = c##, second ##ax^3 + bx^2 + cx + d = d##, third ##ax^3...
  5. T

    Linear algebra - vector spaces, bases

    Yes, the last one should in fact be p(1).
  6. T

    Linear algebra - vector spaces, bases

    so for ##p'(0)## we'll have ##c##, for ##p'(1)## we will have ##3a^2+2b+c##, for ##p(0) d## and for ##p(1) a^3+b^2+c+d##... How will the final solution look like then? Just a vector with these elements?
  7. T

    Linear algebra - vector spaces, bases

    Homework Statement 1) In a vector space V of all real polynomials of third degree or less find basis B such that for arbitrary polynomial p \in V the following applies: [p]_B = \begin{pmatrix} p'(0)\\p'(1)\\p(0)\\p(1)\end{pmatrix} where p' is the derivative of the polynomial p. Homework...
  8. T

    Pascal Permutation Matrix: Find Number of Columns

    Is there an easy way to sort the columns? Can't think of any. I feel like if I wanted to do that the code would be just as long as the one I have already written.
  9. T

    Pascal Permutation Matrix: Find Number of Columns

    Homework Statement I should write a program that determines how many columns of a given matrix are a permutation. The user will input some number N <=20 which will be the size of our matrix NxN. Then he will input the individual elements of the matrix by rows. I need to find out how many...
  10. T

    Discrete Math: Poset Characteristics and Minimum Element Count

    Well "poset" as partially ordered set. What kind of ordering am I assuming? That is up to me, my task is to find out whether such a set exists and if so, what is the least amount of elements it can have.
  11. T

    Discrete Math: Poset Characteristics and Minimum Element Count

    Homework Statement My task is to find out what is the lowest # of elements a poset can have with the following characteristics. If such a set exists I should show it and if it doesn't I must prove it. 1) has infimum of all its subsets, but there is a subset with no supremum 2) has two maximal...
  12. T

    Question about sequences in Pascal

    Hmmm.. it also would put spaces in between the results. I don´t know.. This probably also isn´t the way it is supposed to be done.
  13. T

    Question about sequences in Pascal

    Maybe some sort of recursion?
  14. T

    Question about sequences in Pascal

    I am almost 100% sure this can be done with some basic stuff, without using anything external. Defining a function or a procedure would probably make no difference here, right?
  15. T

    Question about sequences in Pascal

    What do you mean? There are no more restrictions than what I have written there.
Back
Top