**Speedup of Odd-Even Transposition Sort**
Hi all,
I know that the worst case scenario of Odd-Even Transposition Sort
running on n processors sorting n numbers is O(n). However, I've seen
mentions of the absolute speedup being O(log n). How is this value obtained?
Thank you.
Regards,
Rayne
--
...

**Speedup of parallel odd-even transposition sort**Hi all,
I understand that the worst case sort time for parallel odd-even
transposition sort using n processors sorting n numbers is O(n), but
I've read that the absolute speedup is O(log n), and I can't
understand how that came about. Can anyone explain it to me?
Thank you.
Regards,
Rayne
...

**odd-even sort**apa bisa odd-even diterapkan di ethrnet topologi star?minta panduan
tentang algoritma parallelnya pada sistem sorting data.makasih
...

**Even-Odd sorting**Hello.
It seems a year is all it takes for one's proficiency in C++ to become
too rusty. Professionally, I've been away from the language (and from
programming in general), but I still preserve an appreciation for it.
So I decided to toy with some idea, just for fun and for evaluating how
rusty I'd become. "Let me write a simple functor for sorting the
elements of a collection! I will start with a simple collection of
integers.", I thought. I then chose an unusual criterion for the
sorting: "I'd like the elements to be ordered so that the even members
sh...

**Side-by-side in Texshop even/odd odd/even ?**I use TexShop 2.47 on Mac OSX 10.6.8 to display pdf files, and it is
great.
I'm looking for a way to get TexShop to display pages, side-by-side,
say, pages 25 and 26, and then when I advance, it would
show pages 26 and 27.
However, with everything I've tried (including the "Go to page" box),
TexShop advances by 2 pages, showing me pages 27 and 28.
NB: The split-window button splits the window into an upper-part
and a lower-part. If I could get it to split into a left-part
and right-part, that would be good enough, as I could adviance
the two pages separately....

**sorting even and odd numbers**Can anyone suggest a good way to sort according to odd and even? I have a
database of properties and it would be useful to organize according to which
side of the street they're on (ie odd/even #). I'm using FM7.
Thanks for any advice!
David
In article <p49%c.4415$RP5.1813@fe51.usenetserver.com>,
"DavidF" <mindfulnesspractice@yahoo.com> wrote:
> Can anyone suggest a good way to sort according to odd and even? I have a
> database of properties and it would be useful to organize according to which
> side of the street they're on (ie odd/even #)....

**Odds and evens, or just odds**Does anyone know of an algorithm to check if a number is odd or even
and perform a calculation to ensure that number becomes either odd or
even depending on user choice. The output must be non-destructive to
the original number, i.e. get the original number back by reversing the
algorithm or using a different algorithm.
Problem set by our teacher, sounds simple but has us all worried.
Thanks Phil
Phil wrote:
> Does anyone know of an algorithm to check if a number is odd or even
> and perform a calculation to ensure that number becomes either odd or
> even depending on user choice...

**Sorting out sort**I'm trying to extract a column from a flatfile database and print it
alphabetically. I can get the data out, but I can't get it to sort.
The database is pipe-separated in a plain text file and looks like
this:
Ref_no|Title|County|Another_field|And_another|And_another
1234|A Name|Devon|Data here|More data here|And more data
1234|A Name|Somerset|Data here|More data here|And more data
1234|A Name|Nottinghamshire|Data here|More data here|And more data
1234|A Name|Essex|Data here|More data here|And more data
.... and so on
My routine is as follows:
#open the file
open (INFILE, 'dat...

**even or odd**If I need to check whether I have an even clock cycle or odd, how can I
do it? should I use a counter? If using a counter, do I %2 it to check
if it returns 0 or 1? Is there an easier way to check for even or odd
clock cycles?
thanks
crazyrdx wrote:
> If I need to check whether I have an even clock cycle or odd, how can I
> do it? should I use a counter? If using a counter, do I %2 it to check
> if it returns 0 or 1? Is there an easier way to check for even or odd
> clock cycles?
>
> thanks
>
Yes, use a T type flip flop. Thjis is a flip flop that toggles every
clock c...

**even or odd**The program always shows that the input is odd.
int main ()
{
int n, d;
printf ("Enter a Number: ");
scanf ("%d", &n);
d=1;
if (d==n)
{
printf ("The number is odd\n");
}
else if (d < n)
{
for (; d<n; d+=2);
printf ("The number is odd\n");
}
else
{
printf ("The number is even\n");
}
--
Mustafa El Sayid
melsayid <melsayid@gmail.com> wrote:
> The program always shows that the input is odd.
No, it doesn't. Try ente...

**Odds/Evens**Anyone know of a simple calculation that can test whether a given week is
odd or even? Here's the thing:
I have a school timetable that tumbles: week 1 the order of periods is 1 -
2 - 3 - 4 while week 2 the order of periods is 2 - 1 - 3 - 4. Every other
week is a week 2 timetable.
If it's week 1, then XYZ will result, but if it's week 2, ABC will result.
So what I need to do is generate a simple way of saying if it's the week of,
say, March 22 - 26 it's a week 2, so do ABC.
I know I could use a brute force CASE statement, but I was hoping for
something portable so that...

**odd? and even?**What should be the behavior of odd? and even? for:
1. inexact integers,
2. exact non-integers,
3. inexact non-integers?
Should some of them by errors? Or should both return false sometimes?
Guile and Bigloo signal errors, but R5RS suggests they should be defined
for all numbers.
--
__("< Marcin Kowalczyk
\__/ qrczak@knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
Marcin 'Qrczak' Kowalczyk <qrczak@knm.org.pl> writes:
> What should be the behavior of odd? and even? for:
> 1. inexact integers,
> 2. exact non-integers,
> 3. inexact ...

**sorted or .sort() ?**My poor understanding is that the difference between `sorted(somelist,
key=lambda x:...)` and `somelist.sort(lambda x,y...)` is that one
returns a new list and the other sorts in-place.
Does that mean that .sort() is more efficient and should be favored
when you can (i.e. when you don't mind changing the listish object)?
Peter Bengtsson <peterbe@gmail.com> writes:
> My poor understanding is that the difference between `sorted(somelist,
> key=lambda x:...)` and `somelist.sort(lambda x,y...)` is that one
> returns a new list and the other sorts in-place.
Yes.
> Does th...

**Even and odds**Is there a function in Matlab
for extinguishing which is even number and which is
odd?
Jack wrote:
> Is there a function in Matlab
> for extinguishing which is even number and which is
> odd?
mod(number,2) should do the trick. the result is 0 for even and 1 for
odd numbers.
however, make sure that number is an integer (or apply FIX, CEIL, FLOOR,
or ROUND first).
michael
Jack:
<SNIP the everlasting even? odd?...
one of the solutions
% naturally, only integers should be tested...
a=-10:10;
r=bitand(abs(a),1)
us
> > Is there a function in Matlab
> > fo...

**Odd or Even ??**Hi all,
I have string "714BE"(actually this is the data in hexa decimal,but
I have read as string from a file), I need to find out whether it is
ODD or EVEN, Please can any one help me out in this.
rgds
Sree
"Sree" <serverin2000@yahoo.com> wrote in message
news:e9936b79.0311210829.7b28cce4@posting.google.com...
> I have string "714BE"(actually this is the data in hexa decimal,but
> I have read as string from a file), I need to find out whether it is
> ODD or EVEN, Please can any one help me out in this.
It's even.
When faced with ...

**even or odd**Hello everybody,
is there anybody who can tell me, if there is a function which tells
me if an integer is even or odd?
I'll be really glad, if you can help me soon.
Thanks so much.
Pat
"Patricia Fabiano" <pfab@noname.com> wrote in message
news:ef09f57.-1@webx.raydaftYaTP...
> Hello everybody,
>
> is there anybody who can tell me, if there is a function which tells
> me if an integer is even or odd?
>
> I'll be really glad, if you can help me soon.
>
> Thanks so much.
>
> Pat
There is no builtin function. You can write your own very e...

**Even/odd**How about even and odd functions built-in:
bool x;
x = even(num);
x = odd(num);
"Edward Seger" <edward.h.seger@saic.com> wrote in message
<fak6ev$t2k$1@fred.mathworks.com>...
> How about even and odd functions built-in:
>
> bool x;
>
> x = even(num);
> x = odd(num);
So what's wrong with <mod> ?
mod(x,2)
0 if even, 1 if odd
Steve Amphlett:
<SNIP down to typical even/odd algorithm...
> mod(x,2)
> 0 if even, 1 if odd
% now, since even/odd should be integers,
% this may fail, eg,
n=-4:4;
m=n;
even=mod(m,2)==0;...

**odd even**is there any command in which we can directly identify either a number is odd or even..
if x = 2
then there should be a direct command to check weather x is odd or even..
i am a new user
"Mir " <tarisk4u@gmail.com> wrote in message <gv1krn$e9j$1@fred.mathworks.com>...
> is there any command in which we can directly identify either a number is odd or even..
>
> if x = 2
>
> then there should be a direct command to check weather x is odd or even..
>
> i am a new user
Hi,
Rem(x,2) equals 0 if x is odd, and 1 if even.
Mira
In article <gv1k...

**Evens and odds**> The ability in loop to do even complex things like:
>
> (loop for x in '(1 2 3 4 5 6 7)
> when (evenp x)
> collect x into evens
> else
> collect x into odds
> finally
> (return (values evens odds)))
> => (2 4 6), (1 3 5 7)
Factor:
{ 1 2 3 4 5 6 7 } [ even? ] partition
--- Data stack:
{ 2 4 6 }
{ 1 3 5 7 }
WJ wrote:
> > The ability in loop to do even complex things like:
> >
> > (loop for x in '(1 2 3 4 5 6 7)
> > when (evenp x)
> > collect ...

**even or odd?**Hiya,
I have a number x, for which I'd like to check if the number is even
or odd. if it is even I'd like to use it as it is but if it odd I'd
like to round it tot the nearest even number and use it.
I tried the following
check= mod(x,2)
if check ==1
x=2*floor(x/2)
else
y=x
I think the problem here is the else statement where I say y=x. How
would i be able touse y as the final output from the loop when it is
not even defined in the 'if' part of the signal. Can someone help me
do this please?
Hi,
try this :
M=[1:5;6:10]
M+mod(M,2)
J�r�me
a=[-5:5]
b=round(a/2...

**Is zero even or odd?**I know 0 is neither negative or positive but what about odd/even? I think
it's even.
Odd numbers start at 1 and go every other number 1,3,5,7;1,-1,-3,-5,-7
Even starts at 2 and go every other number 2,4,6,8;2,0,-2,-4,-6,-8
Gactimus wrote:
> I know 0 is neither negative or positive but what about odd/even? I thi=
nk
> it's even.=20
>=20
> Odd numbers start at 1 and go every other number 1,3,5,7;1,-1,-3,-5,-7
> Even starts at 2 and go every other number 2,4,6,8;2,0,-2,-4,-6,-8
As it can be divided by 2 without a remainder, it is obviously even.
--=20
Josef M=F6llers (...

**Even/Odd Loop**I'm trying to build a string in Access 2007 VBA that I would pass a
value "Quarters" to, and a value "Consecutive" to. I'm trying to
identify patterns in quarterly data/
If the number of "Quarters"is 2, and "Consecutive" is 2, then I'm
looking for any two quarters in a row where they are equal. (1 and 2).
If the number of "Quarters"is 3, and "Consecutive" is 2, then I'm
looking for any two quarters in a row where they
are equal (1 and 2, or 2 and 3).
Is there a way to do this with a For/Next loop so that I can do t...

**Odd sort() problem**I friend of mine recently accessed me for a little one liner to nicely
display all the paths in the $PATH vartiable on his NT 5.1 (aka XP Pro)
machine: (sorry for word wrap)
C:\> perl -e "print qq{\n}, join(qq{\n}, sort { lc{$a} cmp lc($b) }
split(/;/, $ENV {'PATH'})), qq{\n};"
C:\Program Files\Borland\JBuilder6\jdk1.3.1\bin
C:\Program Files\Executive Software\Diskeeper\
C:\Program Files\ATI Technologies\ATI Control Panel
C:\usr\local\wbin
C:\Inetpub\wwwroot\perl\bin\
C:\PROGRA~1\Borland\CBUILD~1\Projects\Bpl
C:\PROGRA~1\Borland\CBUILD~...

**Even and Odd functions**Applying makeper makes the piecewise functions x and y periodic, yet they don't appear as even and odd functions whereas the Sin and Cos functions do show as odd and even.
xx and yy are the functions which fail the even/odd test yet show as even and odd according to the plots.
I couldn't determine why. Help appreciated.
ClearAll[x, y, xx, yy, makeper]
x[t_] := Piecewise[{{-1, -1/2 <= t < 0}, {1, 0 <= t < 1/2}}]
y[t_] := Piecewise[{{-t - 1/4, -1/2 <= t < 0}, {t - 1/4, 0 <= t < 1/2}}]
makeper[f_, p_, d_][t_] := f[Mod[t, p, d]]
(* Plot[x@t,{t,-5,5},P...