No presente escrito imos a tratar o tema da ordenación bitónica de secuencias de
números. Esta ordenación foi plantexada especialmente para a súa programación en paralelo,
como veremos máis adiante. Centrados nesta temática, faremos unha breve introdución aos
conceptos teóricos das secuencias bitónicas, para logo facer unha exposición de cómo ordear e
crear unha secuencia bitónicas. Rematando o documento facendo unha referencia a
implementación do algoritmo.
2024 State of Marketing Report – by HubspotMarius Sescu
https://www.hubspot.com/state-of-marketing
· Scaling relationships and proving ROI
· Social media is the place for search, sales, and service
· Authentic influencer partnerships fuel brand growth
· The strongest connections happen via call, click, chat, and camera.
· Time saved with AI leads to more creative work
· Seeking: A single source of truth
· TLDR; Get on social, try AI, and align your systems.
· More human marketing, powered by robots
ChatGPT is a revolutionary addition to the world since its introduction in 2022. A big shift in the sector of information gathering and processing happened because of this chatbot. What is the story of ChatGPT? How is the bot responding to prompts and generating contents? Swipe through these slides prepared by Expeed Software, a web development company regarding the development and technical intricacies of ChatGPT!
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
The realm of product design is a constantly changing environment where technology and style intersect. Every year introduces fresh challenges and exciting trends that mold the future of this captivating art form. In this piece, we delve into the significant trends set to influence the look and functionality of product design in the year 2024.
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
Mental health has been in the news quite a bit lately. Dozens of U.S. states are currently suing Meta for contributing to the youth mental health crisis by inserting addictive features into their products, while the U.S. Surgeon General is touring the nation to bring awareness to the growing epidemic of loneliness and isolation. The country has endured periods of low national morale, such as in the 1970s when high inflation and the energy crisis worsened public sentiment following the Vietnam War. The current mood, however, feels different. Gallup recently reported that national mental health is at an all-time low, with few bright spots to lift spirits.
To better understand how Americans are feeling and their attitudes towards mental health in general, ThinkNow conducted a nationally representative quantitative survey of 1,500 respondents and found some interesting differences among ethnic, age and gender groups.
Technology
For example, 52% agree that technology and social media have a negative impact on mental health, but when broken out by race, 61% of Whites felt technology had a negative effect, and only 48% of Hispanics thought it did.
While technology has helped us keep in touch with friends and family in faraway places, it appears to have degraded our ability to connect in person. Staying connected online is a double-edged sword since the same news feed that brings us pictures of the grandkids and fluffy kittens also feeds us news about the wars in Israel and Ukraine, the dysfunction in Washington, the latest mass shooting and the climate crisis.
Hispanics may have a built-in defense against the isolation technology breeds, owing to their large, multigenerational households, strong social support systems, and tendency to use social media to stay connected with relatives abroad.
Age and Gender
When asked how individuals rate their mental health, men rate it higher than women by 11 percentage points, and Baby Boomers rank it highest at 83%, saying it’s good or excellent vs. 57% of Gen Z saying the same.
Gen Z spends the most amount of time on social media, so the notion that social media negatively affects mental health appears to be correlated. Unfortunately, Gen Z is also the generation that’s least comfortable discussing mental health concerns with healthcare professionals. Only 40% of them state they’re comfortable discussing their issues with a professional compared to 60% of Millennials and 65% of Boomers.
Race Affects Attitudes
As seen in previous research conducted by ThinkNow, Asian Americans lag other groups when it comes to awareness of mental health issues. Twenty-four percent of Asian Americans believe that having a mental health issue is a sign of weakness compared to the 16% average for all groups. Asians are also considerably less likely to be aware of mental health services in their communities (42% vs. 55%) and most likely to seek out information on social media (51% vs. 35%).
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
This article is all about what AI trends will emerge in the field of creative operations in 2024. All the marketers and brand builders should be aware of these trends for their further use and save themselves some time!
2024 State of Marketing Report – by HubspotMarius Sescu
https://www.hubspot.com/state-of-marketing
· Scaling relationships and proving ROI
· Social media is the place for search, sales, and service
· Authentic influencer partnerships fuel brand growth
· The strongest connections happen via call, click, chat, and camera.
· Time saved with AI leads to more creative work
· Seeking: A single source of truth
· TLDR; Get on social, try AI, and align your systems.
· More human marketing, powered by robots
ChatGPT is a revolutionary addition to the world since its introduction in 2022. A big shift in the sector of information gathering and processing happened because of this chatbot. What is the story of ChatGPT? How is the bot responding to prompts and generating contents? Swipe through these slides prepared by Expeed Software, a web development company regarding the development and technical intricacies of ChatGPT!
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
The realm of product design is a constantly changing environment where technology and style intersect. Every year introduces fresh challenges and exciting trends that mold the future of this captivating art form. In this piece, we delve into the significant trends set to influence the look and functionality of product design in the year 2024.
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
Mental health has been in the news quite a bit lately. Dozens of U.S. states are currently suing Meta for contributing to the youth mental health crisis by inserting addictive features into their products, while the U.S. Surgeon General is touring the nation to bring awareness to the growing epidemic of loneliness and isolation. The country has endured periods of low national morale, such as in the 1970s when high inflation and the energy crisis worsened public sentiment following the Vietnam War. The current mood, however, feels different. Gallup recently reported that national mental health is at an all-time low, with few bright spots to lift spirits.
To better understand how Americans are feeling and their attitudes towards mental health in general, ThinkNow conducted a nationally representative quantitative survey of 1,500 respondents and found some interesting differences among ethnic, age and gender groups.
Technology
For example, 52% agree that technology and social media have a negative impact on mental health, but when broken out by race, 61% of Whites felt technology had a negative effect, and only 48% of Hispanics thought it did.
While technology has helped us keep in touch with friends and family in faraway places, it appears to have degraded our ability to connect in person. Staying connected online is a double-edged sword since the same news feed that brings us pictures of the grandkids and fluffy kittens also feeds us news about the wars in Israel and Ukraine, the dysfunction in Washington, the latest mass shooting and the climate crisis.
Hispanics may have a built-in defense against the isolation technology breeds, owing to their large, multigenerational households, strong social support systems, and tendency to use social media to stay connected with relatives abroad.
Age and Gender
When asked how individuals rate their mental health, men rate it higher than women by 11 percentage points, and Baby Boomers rank it highest at 83%, saying it’s good or excellent vs. 57% of Gen Z saying the same.
Gen Z spends the most amount of time on social media, so the notion that social media negatively affects mental health appears to be correlated. Unfortunately, Gen Z is also the generation that’s least comfortable discussing mental health concerns with healthcare professionals. Only 40% of them state they’re comfortable discussing their issues with a professional compared to 60% of Millennials and 65% of Boomers.
Race Affects Attitudes
As seen in previous research conducted by ThinkNow, Asian Americans lag other groups when it comes to awareness of mental health issues. Twenty-four percent of Asian Americans believe that having a mental health issue is a sign of weakness compared to the 16% average for all groups. Asians are also considerably less likely to be aware of mental health services in their communities (42% vs. 55%) and most likely to seek out information on social media (51% vs. 35%).
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
This article is all about what AI trends will emerge in the field of creative operations in 2024. All the marketers and brand builders should be aware of these trends for their further use and save themselves some time!
A report by thenetworkone and Kurio.
The contributing experts and agencies are (in an alphabetical order): Sylwia Rytel, Social Media Supervisor, 180heartbeats + JUNG v MATT (PL), Sharlene Jenner, Vice President - Director of Engagement Strategy, Abelson Taylor (USA), Alex Casanovas, Digital Director, Atrevia (ES), Dora Beilin, Senior Social Strategist, Barrett Hoffher (USA), Min Seo, Campaign Director, Brand New Agency (KR), Deshé M. Gully, Associate Strategist, Day One Agency (USA), Francesca Trevisan, Strategist, Different (IT), Trevor Crossman, CX and Digital Transformation Director; Olivia Hussey, Strategic Planner; Simi Srinarula, Social Media Manager, The Hallway (AUS), James Hebbert, Managing Director, Hylink (CN / UK), Mundy Álvarez, Planning Director; Pedro Rojas, Social Media Manager; Pancho González, CCO, Inbrax (CH), Oana Oprea, Head of Digital Planning, Jam Session Agency (RO), Amy Bottrill, Social Account Director, Launch (UK), Gaby Arriaga, Founder, Leonardo1452 (MX), Shantesh S Row, Creative Director, Liwa (UAE), Rajesh Mehta, Chief Strategy Officer; Dhruv Gaur, Digital Planning Lead; Leonie Mergulhao, Account Supervisor - Social Media & PR, Medulla (IN), Aurelija Plioplytė, Head of Digital & Social, Not Perfect (LI), Daiana Khaidargaliyeva, Account Manager, Osaka Labs (UK / USA), Stefanie Söhnchen, Vice President Digital, PIABO Communications (DE), Elisabeth Winiartati, Managing Consultant, Head of Global Integrated Communications; Lydia Aprina, Account Manager, Integrated Marketing and Communications; Nita Prabowo, Account Manager, Integrated Marketing and Communications; Okhi, Web Developer, PNTR Group (ID), Kei Obusan, Insights Director; Daffi Ranandi, Insights Manager, Radarr (SG), Gautam Reghunath, Co-founder & CEO, Talented (IN), Donagh Humphreys, Head of Social and Digital Innovation, THINKHOUSE (IRE), Sarah Yim, Strategy Director, Zulu Alpha Kilo (CA).
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
The search marketing landscape is evolving rapidly with new technologies, and professionals, like you, rely on innovative paid search strategies to meet changing demands.
It’s important that you’re ready to implement new strategies in 2024.
Check this out and learn the top trends in paid search advertising that are expected to gain traction, so you can drive higher ROI more efficiently in 2024.
You’ll learn:
- The latest trends in AI and automation, and what this means for an evolving paid search ecosystem.
- New developments in privacy and data regulation.
- Emerging ad formats that are expected to make an impact next year.
Watch Sreekant Lanka from iQuanti and Irina Klein from OneMain Financial as they dive into the future of paid search and explore the trends, strategies, and technologies that will shape the search marketing landscape.
If you’re looking to assess your paid search strategy and design an industry-aligned plan for 2024, then this webinar is for you.
5 Public speaking tips from TED - Visualized summarySpeakerHub
From their humble beginnings in 1984, TED has grown into the world’s most powerful amplifier for speakers and thought-leaders to share their ideas. They have over 2,400 filmed talks (not including the 30,000+ TEDx videos) freely available online, and have hosted over 17,500 events around the world.
With over one billion views in a year, it’s no wonder that so many speakers are looking to TED for ideas on how to share their message more effectively.
The article “5 Public-Speaking Tips TED Gives Its Speakers”, by Carmine Gallo for Forbes, gives speakers five practical ways to connect with their audience, and effectively share their ideas on stage.
Whether you are gearing up to get on a TED stage yourself, or just want to master the skills that so many of their speakers possess, these tips and quotes from Chris Anderson, the TED Talks Curator, will encourage you to make the most impactful impression on your audience.
See the full article and more summaries like this on SpeakerHub here: https://speakerhub.com/blog/5-presentation-tips-ted-gives-its-speakers
See the original article on Forbes here:
http://www.forbes.com/forbes/welcome/?toURL=http://www.forbes.com/sites/carminegallo/2016/05/06/5-public-speaking-tips-ted-gives-its-speakers/&refURL=&referrer=#5c07a8221d9b
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
Everyone is in agreement that ChatGPT (and other generative AI tools) will shape the future of work. Yet there is little consensus on exactly how, when, and to what extent this technology will change our world.
Businesses that extract maximum value from ChatGPT will use it as a collaborative tool for everything from brainstorming to technical maintenance.
For individuals, now is the time to pinpoint the skills the future professional will need to thrive in the AI age.
Check out this presentation to understand what ChatGPT is, how it will shape the future of work, and how you can prepare to take advantage.
A brief introduction to DataScience with explaining of the concepts, algorithms, machine learning, supervised and unsupervised learning, clustering, statistics, data preprocessing, real-world applications etc.
It's part of a Data Science Corner Campaign where I will be discussing the fundamentals of DataScience, AIML, Statistics etc.
Time Management & Productivity - Best PracticesVit Horky
Here's my presentation on by proven best practices how to manage your work time effectively and how to improve your productivity. It includes practical tips and how to use tools such as Slack, Google Apps, Hubspot, Google Calendar, Gmail and others.
The six step guide to practical project managementMindGenius
The six step guide to practical project management
If you think managing projects is too difficult, think again.
We’ve stripped back project management processes to the
basics – to make it quicker and easier, without sacrificing
the vital ingredients for success.
“If you’re looking for some real-world guidance, then The Six Step Guide to Practical Project Management will help.”
Dr Andrew Makar, Tactical Project Management
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
During this webinar, Anand Bagmar demonstrates how AI tools such as ChatGPT can be applied to various stages of the software development life cycle (SDLC) using an eCommerce application case study. Find the on-demand recording and more info at https://applitools.info/b59
Key takeaways:
• Learn how to use ChatGPT to add AI power to your testing and test automation
• Understand the limitations of the technology and where human expertise is crucial
• Gain insight into different AI-based tools
• Adopt AI-based tools to stay relevant and optimize work for developers and testers
* ChatGPT and OpenAI belong to OpenAI, L.L.C.
More than Just Lines on a Map: Best Practices for U.S Bike Routes
This session highlights best practices and lessons learned for U.S. Bike Route System designation, as well as how and why these routes should be integrated into bicycle planning at the local and regional level.
Presenters:
Presenter: Kevin Luecke Toole Design Group
Co-Presenter: Virginia Sullivan Adventure Cycling Association
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
Has your project been caught in a storm of deadlines, clashing requirements, and the need to change course halfway through? If yes, then check out how the administration team navigated through all of this, relocating 160 people from 3 countries and opening 2 offices during the most turbulent time in the last 20 years. Belka Games’ Chief Administrative Officer, Katerina Rudko, will share universal approaches and life hacks that can help your project survive unstable periods when there seem to be too many tasks and a lack of time and people.
This presentation was designed to provide strategic recommendations for a brand in decline. The deck also incorporates a situational assessment, including a brand identity, positioning, architecture, and portfolio strategy for the Brand.
Presentation originally created for NYU Stern's Brand Strategy course. Design by Erica Santiago & Chris Alexander.
A report by thenetworkone and Kurio.
The contributing experts and agencies are (in an alphabetical order): Sylwia Rytel, Social Media Supervisor, 180heartbeats + JUNG v MATT (PL), Sharlene Jenner, Vice President - Director of Engagement Strategy, Abelson Taylor (USA), Alex Casanovas, Digital Director, Atrevia (ES), Dora Beilin, Senior Social Strategist, Barrett Hoffher (USA), Min Seo, Campaign Director, Brand New Agency (KR), Deshé M. Gully, Associate Strategist, Day One Agency (USA), Francesca Trevisan, Strategist, Different (IT), Trevor Crossman, CX and Digital Transformation Director; Olivia Hussey, Strategic Planner; Simi Srinarula, Social Media Manager, The Hallway (AUS), James Hebbert, Managing Director, Hylink (CN / UK), Mundy Álvarez, Planning Director; Pedro Rojas, Social Media Manager; Pancho González, CCO, Inbrax (CH), Oana Oprea, Head of Digital Planning, Jam Session Agency (RO), Amy Bottrill, Social Account Director, Launch (UK), Gaby Arriaga, Founder, Leonardo1452 (MX), Shantesh S Row, Creative Director, Liwa (UAE), Rajesh Mehta, Chief Strategy Officer; Dhruv Gaur, Digital Planning Lead; Leonie Mergulhao, Account Supervisor - Social Media & PR, Medulla (IN), Aurelija Plioplytė, Head of Digital & Social, Not Perfect (LI), Daiana Khaidargaliyeva, Account Manager, Osaka Labs (UK / USA), Stefanie Söhnchen, Vice President Digital, PIABO Communications (DE), Elisabeth Winiartati, Managing Consultant, Head of Global Integrated Communications; Lydia Aprina, Account Manager, Integrated Marketing and Communications; Nita Prabowo, Account Manager, Integrated Marketing and Communications; Okhi, Web Developer, PNTR Group (ID), Kei Obusan, Insights Director; Daffi Ranandi, Insights Manager, Radarr (SG), Gautam Reghunath, Co-founder & CEO, Talented (IN), Donagh Humphreys, Head of Social and Digital Innovation, THINKHOUSE (IRE), Sarah Yim, Strategy Director, Zulu Alpha Kilo (CA).
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
The search marketing landscape is evolving rapidly with new technologies, and professionals, like you, rely on innovative paid search strategies to meet changing demands.
It’s important that you’re ready to implement new strategies in 2024.
Check this out and learn the top trends in paid search advertising that are expected to gain traction, so you can drive higher ROI more efficiently in 2024.
You’ll learn:
- The latest trends in AI and automation, and what this means for an evolving paid search ecosystem.
- New developments in privacy and data regulation.
- Emerging ad formats that are expected to make an impact next year.
Watch Sreekant Lanka from iQuanti and Irina Klein from OneMain Financial as they dive into the future of paid search and explore the trends, strategies, and technologies that will shape the search marketing landscape.
If you’re looking to assess your paid search strategy and design an industry-aligned plan for 2024, then this webinar is for you.
5 Public speaking tips from TED - Visualized summarySpeakerHub
From their humble beginnings in 1984, TED has grown into the world’s most powerful amplifier for speakers and thought-leaders to share their ideas. They have over 2,400 filmed talks (not including the 30,000+ TEDx videos) freely available online, and have hosted over 17,500 events around the world.
With over one billion views in a year, it’s no wonder that so many speakers are looking to TED for ideas on how to share their message more effectively.
The article “5 Public-Speaking Tips TED Gives Its Speakers”, by Carmine Gallo for Forbes, gives speakers five practical ways to connect with their audience, and effectively share their ideas on stage.
Whether you are gearing up to get on a TED stage yourself, or just want to master the skills that so many of their speakers possess, these tips and quotes from Chris Anderson, the TED Talks Curator, will encourage you to make the most impactful impression on your audience.
See the full article and more summaries like this on SpeakerHub here: https://speakerhub.com/blog/5-presentation-tips-ted-gives-its-speakers
See the original article on Forbes here:
http://www.forbes.com/forbes/welcome/?toURL=http://www.forbes.com/sites/carminegallo/2016/05/06/5-public-speaking-tips-ted-gives-its-speakers/&refURL=&referrer=#5c07a8221d9b
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
Everyone is in agreement that ChatGPT (and other generative AI tools) will shape the future of work. Yet there is little consensus on exactly how, when, and to what extent this technology will change our world.
Businesses that extract maximum value from ChatGPT will use it as a collaborative tool for everything from brainstorming to technical maintenance.
For individuals, now is the time to pinpoint the skills the future professional will need to thrive in the AI age.
Check out this presentation to understand what ChatGPT is, how it will shape the future of work, and how you can prepare to take advantage.
A brief introduction to DataScience with explaining of the concepts, algorithms, machine learning, supervised and unsupervised learning, clustering, statistics, data preprocessing, real-world applications etc.
It's part of a Data Science Corner Campaign where I will be discussing the fundamentals of DataScience, AIML, Statistics etc.
Time Management & Productivity - Best PracticesVit Horky
Here's my presentation on by proven best practices how to manage your work time effectively and how to improve your productivity. It includes practical tips and how to use tools such as Slack, Google Apps, Hubspot, Google Calendar, Gmail and others.
The six step guide to practical project managementMindGenius
The six step guide to practical project management
If you think managing projects is too difficult, think again.
We’ve stripped back project management processes to the
basics – to make it quicker and easier, without sacrificing
the vital ingredients for success.
“If you’re looking for some real-world guidance, then The Six Step Guide to Practical Project Management will help.”
Dr Andrew Makar, Tactical Project Management
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
During this webinar, Anand Bagmar demonstrates how AI tools such as ChatGPT can be applied to various stages of the software development life cycle (SDLC) using an eCommerce application case study. Find the on-demand recording and more info at https://applitools.info/b59
Key takeaways:
• Learn how to use ChatGPT to add AI power to your testing and test automation
• Understand the limitations of the technology and where human expertise is crucial
• Gain insight into different AI-based tools
• Adopt AI-based tools to stay relevant and optimize work for developers and testers
* ChatGPT and OpenAI belong to OpenAI, L.L.C.
More than Just Lines on a Map: Best Practices for U.S Bike Routes
This session highlights best practices and lessons learned for U.S. Bike Route System designation, as well as how and why these routes should be integrated into bicycle planning at the local and regional level.
Presenters:
Presenter: Kevin Luecke Toole Design Group
Co-Presenter: Virginia Sullivan Adventure Cycling Association
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
Has your project been caught in a storm of deadlines, clashing requirements, and the need to change course halfway through? If yes, then check out how the administration team navigated through all of this, relocating 160 people from 3 countries and opening 2 offices during the most turbulent time in the last 20 years. Belka Games’ Chief Administrative Officer, Katerina Rudko, will share universal approaches and life hacks that can help your project survive unstable periods when there seem to be too many tasks and a lack of time and people.
This presentation was designed to provide strategic recommendations for a brand in decline. The deck also incorporates a situational assessment, including a brand identity, positioning, architecture, and portfolio strategy for the Brand.
Presentation originally created for NYU Stern's Brand Strategy course. Design by Erica Santiago & Chris Alexander.
2. No presente escrito imos a tratar o tema da ordenación bitónica de secuencias de
números. Esta ordenación foi plantexada especialmente para a súa programación en paralelo,
como veremos máis adiante. Centrados nesta temática, faremos unha breve introdución aos
conceptos teóricos das secuencias bitónicas, para logo facer unha exposición de cómo ordear e
crear unha secuencia bitónicas. Rematando o documento facendo unha referencia a
implementación do algoritmo.
1.-Definición e propiedades:
En primeiro lugar como é lóxico introduciremos a definición dunha secuencia bitónica
Definición: Unha secuencia bitónica é unha secuencia de números x0 , x1,..., xn1 cas
seguintes propiedades:
1.-Existe un índice i , con 0 i n 1 , tal que
a0 a1 ... ai1 e ai ai1 ... an1
2.-Ou ben podemos rotar ciclicamente a secuencia, conseguindo que (1) se
cumpra
Agora imos supoñer que temos unha secuencia bitónica con n par de tal forma que
x0 x1 ... xn
2
1
e xn xn ... xn1
2
2
1
Poderemos representar esta secuencia de seguinte forma:
x0
xn
2
x1
xn
2
1
''
xi1
xn
2
H
xi
xn
2
i 1
i
''
xn
2
1
xn1
Ante esta representación temos a seguinte propiedade.
Propiedade: Existe unha única liña H que divide dita representación de x en dúas
rexións etiquetadas como ' ' e ' ' tales que:
1.-Cada par de elementos escollidos da mesma rexión, e un de cada columna
satisfan a condición correspondente a dita rexión.
3. 2.-Ademais tamén se verifica que cada elemento da columna da dereita da
rexión ' ' é igual ou maior que todo elemento da rexión ' ' . Analogamente verificase para a
columna da dereita.
Definición: Aliña horizontal H que induce dúas rexións con estas propiedades dise que
verifica a “unique crossover property”
Exemplo: vexamos agora un exemplo destas primeiras definición e propiedades.
Tomemos a seguinte secuencia de números:
x (3,2,1, 3, 6, 5, 4,0,1,2,6,7,10,9,6,4)
Vemos que esta secuencia tal é como esta non é bitónica. Pero se procedemos a rotala
ciclicamente obtemos a seguinte que si que o é:
x (5, 4,0,1,2,6,7,10,9,6,4,3,2,1, 3, 6)
Representaremos esta secuencia ca representación que vimos antes
5
4
0 ''
1
2
6
7 ''
10
H
9
6
4
3
2
1
3
6
Onde podemos observar que se verifican as propiedades expostas anteriormente. Por
último para concluír este apartado de introdución as secuencias bitónicas, enunciaremos dos
teoremas dos cales omitimos a demostración neste documento.
Teorema 1: Toda secuencia bitónica verifica a “crossover property”
Teorema 2: Dada unha secuencia bitónica x definiremos as dúas secuencias seguintes:
L( x) [min( x0 , x n ),..., min( xi , x n ),..., min( x n , xn1 )]
2
2
i
2
1
R( x) [max( x0 , xn ),..., max( xi , xn ),..., max( xn , xn1 )]
2
2
i
2
1
4. Verifícase que tanto L( x) como R( x) son secuencias bitónicas e que todo elemento de
L( x) é menor ou igual que todo elemento de R( x)
Introducido o concepto de secuencia bitónica e algunhas das súas propiedades,
pasaremos agora a ver como a poderíamos ordear.
2.-Ordeación:
A ordenación dunha secuencia bitónica consistira basicamente en ir calculando
sucesivamente a lista L( x) . Este proceso que explicaremos a continuación con máis detalle, é
posible porque tanto L( x) como a R( x) seguiran sendo secuencias bitónicas a pesar de
aplicarlle o proceso.
Antes de comezar a explicar o método de ordeación, notemos que de aquí en adiante
denominaremos como “split” a operación que nos intercambiara dous elementos da secuencia.
Mediante esta operación iremos calculando as sucesivas L( x) e R( x) . Neste proceso de
ordeación o que faremos será comparar os elementos xi e x n , e intercambiaremos se se
2
i
verifica que xi x n . Será deste xeito como iremos conseguindo as sucesivas L( x) e R( x) .
2
i
Exemplo: Vexamos todo isto cun exemplo que aclarara as ideas aquí expostas.
Consideraremos unha secuencia de oito elementos e aplicaremoslle o método.
posición
0
1
2
3
4
5
6
7
secuencia
2
6
7
10
9
6
4
3
split 1
2
6
4
3
9
6
7
10
split 2
2
3
4
6
7
6
9
10
split 3
2
3
4
6
6
7
9
10
ordeada
Describimos acontinuación o proceso seguido:
No split 1 facemos:
Comparamos as posicións 0 4, non intercambiamos porque 2 9
Comparamos as posicións 1 5, non intercambiamos porque 6=6
Comparamos as posicións 2 6, intercambiamos porque 7>4
Comparamos as posicións 3 7, ntercambiamos porque 10>3
Obtemos deste xeito as subsecuencias bitónicas L( x) 2,6,7,10 e R( x) 9,6,4,3 .
Agora a cada unha destas volvémoslle aplicar o método:
5. No split 2:
Para L( x) :
Comparamos as posicións 0 2, non intercambiamos porque 2<4
Comparamos as posicións 1 3, intercambiamos porque 6>3
Para R( x) :
Comparamos as posicións 4 6, intercambiamos porque 9>7
Comparamos as posicións 5 7, non intercambiamos porque 6<10
Temos agora que :
LL ( x) 2,3; LR ( x) 4,6; RL ( x) 7,6 e RR ( x) 9,10
No Split 3, reordeamos cada para de datos para obter a secuencia ordeada seguinte:
x 2,3,4,6,6,7,9,10
3.-Construcción:
Neste apartado abordaremos o tema da construción dunha secuencia bitónica. Ata
agora vimos como ordear unha secuencia bitónica, agora veremos como a partir dunha
secuencia arbitraria poder chegar a unha secuencia bitónica, para poderlle aplicar a ordeación
que vimos no apartado anterior.
A idea será construír secuencias bitónicas a partir de minisecuencias bitónicas de dous
elementos. Así se temos unha secuencia de catro elementos
x0 , x1
de forma ascendente mentres que
x0 , x1, x2 , x3 ,
ordeamos
x2 , x3 de forma descendente. Concatenando
estas duas secuencias obteremos unha secuencia bitónica. Este método pódese repetir agora
para mini-secuencias de catro elementos conseguindo secuencias bitónicas de 8,… Facendo
isto de forma recursiva obteremos unha secuencia bitónica formada polos mesmos números
da secuencia arbitraria de orixe.
Exemplo: Consideremos a secuencia 1,7,4,6,2,10, 4,0 , o proceso de construción
exponse na seguinte táboa e que se detalla paso a paso de seguido:
posición
0
1
2
3
4
5
6
secuencia
1
7
4
6
2
10
-4
0 Paso 1
1
7
6
4
2
10
0
-4 Paso 2
1
4
6
7
2
10
0
-4
1
4
6
7
10
2
0
-4
bitónica
7
6. Como notación utilizaremos (cre) para determinar que estamos ordeando de forma
crecente e (decre) para o contrario.
Paso1: ordeamos os pares consecutivos
(cre) Comparamos as posicións 0 1, non intercambiamos porque 1<7
(decre) Comparamos as posicións 2 3, intercambiamos porque 4<6
(cre) Comparamos as posicións 4 5, non intercambiamos porque 2<10
(decre) Comparamos as posicións 6 7, intercambiamos porque 0<-4
Paso 2: procedemos a facer o mesmo pero cas secuencias de 4 elementos
split 1:
(cre) Comparamos as posicións 0 2, non intercambiamos porque 1<6
(cre) Comparamos as posicións 1 3, intercambiamos porque 7>4
(decre) Comparamos as posicións 4 6, non intercambiamos porque 2>0
(decre) Comparamos as posicións 5 7, non intercambiamos porque 10>-4
split 2:
(cre) Comparamos as posicións 0 1, non intercambiamos porque 1<4
(cre) Comparamos as posicións 2 3, non intercambiamos porque 6<7
(decre) Comparamos as posicións 4 5, intercambiamos porque 2<10
(decre) Comparamos as posicións 6 7, non intercambiamos porque 0<-4
Chegamos desta forma a nosa secuencia bitónica 1,4,6,7,10,2,0, 4 , polo que
agora para ordeala só habería que aplicarlle o método visto no apartado anterior.
4.-Implementación:
A implementación da ordeación bitónica poderiámolo facer de forma secuencial,
utilizando a idea de recursividade. Así en cada proceso, chamariamos as funcións que nos
ordeasen de forma crecente ou decrecente tantas veces como precisemos para ordear o trozo
da secuencia na que nos atopemos.
Pero como xa comentamos no inicio deste documento, esta ordeación foi
especialmente deseñada para a súa programación en paralelo. A este aspecto ímoslle dedicar
unhas liñas neste apartado.
Dado como foi descrito o problema, tanto os Split como a comparación e intercambio
de elementos se pode facer de forma paralela. Pero para obter unha maior eficiencia,
deberemos abandonar a idea de chamar sucesivamente ao Split, e centrarnos nunha
formulación baseada en cada elemento da nosa sucesión. Para deixar claras as ideas,
utilizaremos un exemplo para explicar a implementación. Analizaremos o proceso mediante un
exemplo, onde a cada índice o denominaremos pola súa formulación binaria:
7. Natural 0
1
2
3
4
5
6
7
Binario 0000 0001 0010 0011 0100 0101 0110 0111
Numeraremos o bit máis a dereita como o bit 0 mentres que o mais a esquerda como
o bit 3. Na iteración i teremos que o bit i será o que nos indique se ordeamos de forma
crecente ou decrecente os pares de elementos tomados. Tendo en conta isto, vexamos como
sería o proceso
1.-Na primeira iteración ordearíamos cada par de elementos consecutivos, e segundo
o bit 1 sexa igual a 0 ou a 1 ordearemolo de forma crecente ou decrecente respectivamente.
Vémolo na seguinte táboa:
Posición Comparadas
0000 0001
0010 0011
0100 0101
0110 0111
Orden
ascendente
descendente
ascendente
descendente
2.-Na segunda iteración, ordearemos as subsecuencias de catro elementos, tendo en
conta que agora é o bit 2 o que nos indica se ordeamos de forma ascendente ou descendente.
Vemos na seguinte táboa a primeira chamada:
Posición Comparadas
0000 0010
0001 0011
0100 0110
0101 0111
Orden
ascendente
ascendente
descendente
descendente
Mentres que na segunda chamada sería:
Posición Comparadas
0000 0001
0010 0011
0100 0101
0110 0111
Orden
ascendente
ascendente
descendente
descendente
3.-Na última iteración, teremos tres chamadas que describiremos nas seguintes
táboas. Sendo neste caso o bit 3 o que nos indica a orden.
8. Primeira chamada
Posición Comparadas
0000 0100
0001 0101
0010 0110
0011 0111
Orden
ascendente
ascendente
ascendente
ascendente
Posición Comparadas
0000 0010
0001 0011
0100 0110
0101 0111
Orden
ascendente
ascendente
ascendente
ascendente
Posición Comparadas
0000 0001
0010 0011
0100 0101
0110 0111
Orden
ascendente
ascendente
ascendente
ascendente
Segunda chamada
Terceira chamada
Observamos que na primeira chamada comparamos os elementos nos cales o bit 2 da
posición é distinto. Na segunda chamada os que teñen distintos o bit 1, mentres que os da
última chamada os que teñen distinto o bit 0.
Desta forma indicamos como sería a comparación tendo en conta as posicións de cada
elemento dentro da secuencia. Notemos que non indicamos se facemos ou non o cambio, iso
dependerá dos elementos que ocupen esas posicións e en que orde as haxa que ordear. Na
descrición que fixemos so indicamos que posición se comparan e cal debería ser a orde de
ordeación.
A implementación nun ordenador deste proceso, tería un código similar ao que segue:
1
2
3
4
5
int i,j,k;
for(k=2;k<=N;k=2*k){
for(j=k>>1;j>0;j=j>>1){
for(i=0;i<N;i++){
int ixj=i^j;
9. 6
7
8
9
10
11
12
if((ixj)>i){
if((i&k)==0 && get(i)>get(ixj)) exchange(i,ixj);
if((i&k)!=0 && get(i)<get(ixj)) exchange(i,ixj);
}
}
}
}
A variable k indica a posición do bit que determina a orde(ascendente ou descendente)
na que son ordeados os pares de elementos comparados. En canto a variable j, correspondese
coa distancia entre os elementos que se comparan mentres que a i permítenos facer o
recorrido por todos os elemento. O ixj é o elemento que comparamos co elemento i (son os
pares de elementos que se diferenzas no bit de posición (log 2 j ) ). Notemos que so
compararemos istos elementos se se da que i<ixj, para evitarnos comparalos 2 veces.
Ata agora estivemos falando de que esta forma de ordear estaba pensado para a súa
programación en paralelo, e o código que expoñemos é secuencial. Pero se nos fixamos, o
bucle da liña 4 e totalmente paralelizable. Isto é debido a que as comparacións dos elementos
se fai de forma independente unha da outra. Podemos comparar ao mesmo tempo os
elementos na posición 0 e 1 a vez que os elementos 2 e 3, por exemplo. Deste xeito
repartiriamos as comparacións dos pares de elementos entre os distintos procesadores dos
que dispoñamos.