comparing combinations

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • suzy

    comparing combinations

    Hi, i'm from belgium, europe, and my english is not perfect, so my excuses.
    I ame looking for someone ho can help me with my problem.

    I want to compare combinations in an imputfile, and if they have 2 or 3 or more the same numbers i want remove then; all the combinations have to be compared
    i give you an example:
    the imput file:

    1, 2, 3, 4, 5, 6
    1, 2, 3, 4, 8, 9
    4, 5, 6, 10, 12, 15
    7 9 11 13 15 16
    7 9 15 18 20 22

    Combinations with max 2 equal numbers; the othets must be removed from the imput list
    the output list:
    1 2 3 4 5 6
    7 9 15 18 20 22

    is it possible in a box were i can change
    the file name and place: *.txt
    the max same numbers: 2-10


    THANKS
    suzy
  • Andrew Thompson

    #2
    Re: comparing combinations

    >"suzy" <suzy.vannespen @skynet.be> wrote in message
    news:402659ea$0 $318$ba620e4c@n ews.skynet.be.. .[color=blue]
    > Hi, i'm from belgium, europe, and my english is not perfect, so my[/color]
    excuses.[color=blue]
    > I ame looking for someone ho can help me with my problem.[/color]

    Suzy, your English is OK, but you need
    to look into various things..

    1) Note that Java and JavaScript are not
    the same language, decide which you are
    going to use before you go any further.

    2) 6 groups is far too wide a 'cross-post'.
    Also some of the groups you posted to
    are not valid groups.
    If your question is Java, restrict it to
    comp.lang.java. help.
    If it is JavaScript, post to
    comp.lang.javas cript

    3) You are posting in 'html' format, which does
    not work well with most NewsReader programs,
    please adjust the options of your program to post
    to UseNet in 'plain text' only.

    Thanks in advance

    --
    Andrew Thompson
    * http://www.PhySci.org/ Open-source software suite
    * http://www.PhySci.org/codes/ Web & IT Help
    * http://www.1point1C.org/ Science & Technology


    Comment

    • suzy

      #3
      Re: comparing combinations


      "Andrew Thompson" <SeeMySites@www .invalid> schreef in bericht
      news:sftVb.4813 2$Wa.39058@news-server.bigpond. net.au...[color=blue][color=green]
      > >"suzy" <suzy.vannespen @skynet.be> wrote in message[/color]
      > news:402659ea$0 $318$ba620e4c@n ews.skynet.be.. .[color=green]
      > > Hi, i'm from belgium, europe, and my english is not perfect, so my[/color]
      > excuses.[color=green]
      > > I ame looking for someone ho can help me with my problem.[/color]
      >
      > Suzy, your English is OK, but you need
      > to look into various things..
      >
      > 1) Note that Java and JavaScript are not
      > the same language, decide which you are
      > going to use before you go any further.
      >
      > 2) 6 groups is far too wide a 'cross-post'.
      > Also some of the groups you posted to
      > are not valid groups.
      > If your question is Java, restrict it to
      > comp.lang.java. help.
      > If it is JavaScript, post to
      > comp.lang.javas cript
      >
      > 3) You are posting in 'html' format, which does
      > not work well with most NewsReader programs,
      > please adjust the options of your program to post
      > to UseNet in 'plain text' only.
      >
      > Thanks in advance
      >
      > --
      > Andrew Thompson
      > * http://www.PhySci.org/ Open-source software suite
      > * http://www.PhySci.org/codes/ Web & IT Help
      > * http://www.1point1C.org/ Science & Technology
      >[/color]
      thanks for your answer
      i do not know if it is a problem for java or javascript? i think java
      thanks
      suzy


      Comment

      • Andrew Thompson

        #4
        Re: comparing combinations

        suzy wrote:[color=blue]
        > "Andrew Thompson" <SeeMySites@www .invalid> schreef in bericht[/color]
        ....[color=blue][color=green]
        >> 1) Note that Java and JavaScript are not
        >> the same language, decide which you are
        >> going to use before you go any further.[/color][/color]
        ...[color=blue]
        > i do not know if it is a problem for java or javascript? i think java[/color]

        If it is on the web and it is an applet, it is Java.
        If it is on the web and _not_ an applet, it is
        JavaScript.

        If it is _not_ on the web, it is Java.

        [ That is oversimplifying it, but it is a
        rough guide. ]

        Do you want to do this in a web page?

        --
        Andrew Thompson
        * http://www.PhySci.org/ Open-source software suite
        * http://www.PhySci.org/codes/ Web & IT Help
        * http://www.1point1C.org/ Science & Technology


        Comment

        • suzy

          #5
          Re: comparing combinations


          "Andrew Thompson" <SeeMySites@www .invalid> schreef in bericht
          news:K5vVb.4814 7$Wa.42740@news-server.bigpond. net.au...[color=blue]
          > suzy wrote:[color=green]
          > > "Andrew Thompson" <SeeMySites@www .invalid> schreef in bericht[/color]
          > ...[color=green][color=darkred]
          > >> 1) Note that Java and JavaScript are not
          > >> the same language, decide which you are
          > >> going to use before you go any further.[/color][/color]
          > ..[color=green]
          > > i do not know if it is a problem for java or javascript? i think java[/color]
          >
          > If it is on the web and it is an applet, it is Java.
          > If it is on the web and _not_ an applet, it is
          > JavaScript.
          >
          > If it is _not_ on the web, it is Java.
          >
          > [ That is oversimplifying it, but it is a
          > rough guide. ]
          >
          > Do you want to do this in a web page?
          >
          > --
          > Andrew Thompson
          > * http://www.PhySci.org/ Open-source software suite
          > * http://www.PhySci.org/codes/ Web & IT Help
          > * http://www.1point1C.org/ Science & Technology
          >[/color]
          it is not an applet, and not on the web; i want to run the program on my
          laptop, windows xp; maybe i insert it in excel for further transformation

          suzy


          Comment

          • ge0rge

            #6
            Re: comparing combinations

            "suzy" <suzy.vannespen @skynet.be> wrote ...
            <snip>[color=blue]
            > it is not an applet, and not on the web; i want to run the program on my
            > laptop, windows xp; maybe i insert it in excel for further transformation[/color]

            So, you have a file with lines containing a set of numbers.
            You want to eliminate lines which have 2 or more similar numbers.
            You have no code at the moment - that's why you are talking something about
            renaming the file as a .txt file (which I don't understand) or inserting the
            file in an excel sheet for further manipulation.

            The probelm as stated is neither a java or javascript problem. It is at this
            stage just a logical problem. What language you choose to use to solve it is
            really irrelevant until you have it clear in your mind how to solve it. To
            take your example -
            1, 2, 3, 4, 5, 6
            1, 2, 3, 4, 8, 9
            4, 5, 6, 10, 12, 15
            7 9 11 13 15 16
            7 9 15 18 20 22

            For the first and second lines, which is the one to discard? If you keep
            line 1, line 3 goes too. If you keep line 2 instead, then line 3 also stays
            in. Similarly which line of lines 4 and 5, do you keep? Seems like your rule
            is early lines stay in if subsequent lines contain 2 or more similar
            numbers. You need to be clear about this.

            Now, putting these values into an excel file will do nothing. There is no
            processing logic built in excel to do what you want. From within excel, you
            would need to call a macro (which itself would probably be written in VB to
            do the processing you want). So one way or another, you would need a bit of
            programming. If you intend to write it in java, do it and come back here
            when you are stuck. Similarly, go to the javascript group only (and not
            here) if you decide to write it in javascript. If you don't know programming
            at all, get a friend to do it or pay someone to write it for you and install
            it for you on your laptop ... or maybe someone here might be in the mood to
            write the code!

            ge0rge
            --
            Matter cannot be created or destroyed, nor can it be returned without a
            receipt.


            Comment

            • suzy

              #7
              Re: comparing combinations


              "ge0rge" <ge0rge@privacy .net> schreef in bericht
              news:c06a8c$13m rs4$1@ID-175222.news.uni-berlin.de...[color=blue]
              > "suzy" <suzy.vannespen @skynet.be> wrote ...
              > <snip>[color=green]
              > > it is not an applet, and not on the web; i want to run the program on my
              > > laptop, windows xp; maybe i insert it in excel for further[/color][/color]
              transformation[color=blue]
              >
              > So, you have a file with lines containing a set of numbers.
              > You want to eliminate lines which have 2 or more similar numbers.[/color]

              yes or 3 or more, or 4 or more

              [color=blue]
              > You have no code at the moment - that's why you are talking something[/color]
              about[color=blue]
              > renaming the file as a .txt file (which I don't understand) or inserting[/color]
              the[color=blue]
              > file in an excel sheet for further manipulation.[/color]

              the outputfile can be a txt file or with an other extention, but i have to
              insert or copy in excel
              the language is for me not important if i can use it on my pc; javascript
              can
              with regards suzy[color=blue]
              >
              > The probelm as stated is neither a java or javascript problem. It is at[/color]
              this[color=blue]
              > stage just a logical problem. What language you choose to use to solve it[/color]
              is[color=blue]
              > really irrelevant until you have it clear in your mind how to solve it. To
              > take your example -
              > 1, 2, 3, 4, 5, 6
              > 1, 2, 3, 4, 8, 9
              > 4, 5, 6, 10, 12, 15
              > 7 9 11 13 15 16
              > 7 9 15 18 20 22
              >
              > For the first and second lines, which is the one to discard? If you keep
              > line 1, line 3 goes too. If you keep line 2 instead, then line 3 also[/color]
              stays[color=blue]
              > in. Similarly which line of lines 4 and 5, do you keep? Seems like your[/color]
              rule[color=blue]
              > is early lines stay in if subsequent lines contain 2 or more similar
              > numbers. You need to be clear about this.
              >
              > Now, putting these values into an excel file will do nothing. There is no
              > processing logic built in excel to do what you want. From within excel,[/color]
              you[color=blue]
              > would need to call a macro (which itself would probably be written in VB[/color]
              to[color=blue]
              > do the processing you want). So one way or another, you would need a bit[/color]
              of[color=blue]
              > programming. If you intend to write it in java, do it and come back here
              > when you are stuck. Similarly, go to the javascript group only (and not
              > here) if you decide to write it in javascript. If you don't know[/color]
              programming[color=blue]
              > at all, get a friend to do it or pay someone to write it for you and[/color]
              install[color=blue]
              > it for you on your laptop ... or maybe someone here might be in the mood[/color]
              to[color=blue]
              > write the code!
              >
              > ge0rge
              > --
              > Matter cannot be created or destroyed, nor can it be returned without a
              > receipt.
              >
              >[/color]


              Comment

              Working...