Task Scheduling. A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering. May 2016 Task Scheduling Slide 1

Similar documents
Task Scheduling. A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering. May 2007 Task Scheduling Slide 1

On the Combination of Constraint Programming and Stochastic Search: The Sudoku Case

Fault-Tolerant Computing

KenKen Strategies. Solution: To answer this, build the 6 6 table of values of the form ab 2 with a {1, 2, 3, 4, 5, 6}

Yet Another Organized Move towards Solving Sudoku Puzzle

Physical Zero-Knowledge Proof: From Sudoku to Nonogram

arxiv: v2 [math.ho] 23 Aug 2018

of Nebraska - Lincoln

Techniques for Generating Sudoku Instances

Problem A: Watch the Skies!

Take Control of Sudoku

Fault-Tolerant Computing

The Mathematics Behind Sudoku Laura Olliverrie Based off research by Bertram Felgenhauer, Ed Russel and Frazer Jarvis. Abstract

Constraint Satisfaction Problems: Formulation

Sudoku. How to become a Sudoku Ninja: Tips, Tricks and Strategies

1 Introduction. 2 An Easy Start. KenKen. Charlotte Teachers Institute, 2015

Quintessence A Packet of Puzzles by John Bulten

KenKen Strategies 17+

Easy Games and Hard Games

A GRAPH THEORETICAL APPROACH TO SOLVING SCRAMBLE SQUARES PUZZLES. 1. Introduction

Homework Assignment #1

Modeling a Rubik s Cube in 3D

T H E M A T H O F S U D O K U

INTRODUCTION TO COMPUTER SCIENCE I PROJECT 6 Sudoku! Revision 2 [2010-May-04] 1

Chapter 5 Backtracking. The Backtracking Technique The n-queens Problem The Sum-of-Subsets Problem Graph Coloring The 0-1 Knapsack Problem

Classic Sudoku 9x9 - Easy To Medium - Volume Logic Puzzles By Nick Snels READ ONLINE

Applications of Advanced Mathematics (C4) Paper B: Comprehension INSERT WEDNESDAY 21 MAY 2008 Time:Upto1hour

Sudoku: Is it Mathematics?

Some results on Su Doku

Sudoku Book: 200 Sudoku Puzzles Of All Difficulties (Volume 2) By Djape READ ONLINE

Spring 06 Assignment 2: Constraint Satisfaction Problems

A year ago I investigated a mathematical problem relating to Latin squares. Most people, whether knowing it or not, have actually seen a Latin square

The mathematics of Septoku

10/5/2015. Constraint Satisfaction Problems. Example: Cryptarithmetic. Example: Map-coloring. Example: Map-coloring. Constraint Satisfaction Problems

Part I: The Swap Puzzle

Mathematics Enhancement Programme TEACHING SUPPORT: Year 3

WPF SUDOKU/PUZZLE GRAND PRIX 2014 WPFSUDOKU GP 2014 COMPETITIONBOOKLET ROUND6. Puzzle authors: Bulgaria Deyan Razsadov.

Beyond Prolog: Constraint Logic Programming

Welcome to the Sudoku and Kakuro Help File.

Investigation of Algorithmic Solutions of Sudoku Puzzles

Game Variations: Ultimate Tic Tac Toe

Lumines Strategies. Greg Aloupis, Jean Cardinal, Sébastien Collette, and Stefan Langerman

Mathematics of Magic Squares and Sudoku

Problem A. Worst Locations

arxiv: v1 [cs.cc] 21 Jun 2017

Informed search algorithms. Chapter 3 (Based on Slides by Stuart Russell, Richard Korf, Subbarao Kambhampati, and UW-AI faculty)

Applications of Advanced Mathematics (C4) Paper B: Comprehension WEDNESDAY 21 MAY 2008 Time:Upto1hour

An Exploration of the Minimum Clue Sudoku Problem

Algorithmique appliquée Projet UNO

Spring 06 Assignment 2: Constraint Satisfaction Problems

ISudoku. Jonathon Makepeace Matthew Harris Jamie Sparrow Julian Hillebrand

DEVELOPING LOGICAL SKILLS WITH THE HELP OF SUDOKU. Radost Nicolaeva-Cohen, Andreea Timiras, Adrian Buciu, Emil Robert Rudi Wimmer

CSC 396 : Introduction to Artificial Intelligence

You ve seen them played in coffee shops, on planes, and

Heuristics, and what to do if you don t know what to do. Carl Hultquist

Link and Link Impedance 2018/02/13. VECTOR DATA ANALYSIS Network Analysis TYPES OF OPERATIONS

Foundations of AI. 3. Solving Problems by Searching. Problem-Solving Agents, Formulating Problems, Search Strategies

Counting Sudoku Variants

PELLISSIPPI STATE COMMUNITY COLLEGE MASTER SYLLABUS AUTOCAD FOR INTERIOR DESIGN: STUDIO IV IDT 2305

PA3 Part 2: BLM List. Workbook 3 - Patterns & Algebra, Part 2 1 BLACKLINE MASTERS

MITOCW watch?v=krzi60lkpek

arxiv:cs/ v2 [cs.cc] 27 Jul 2001

Lecture 2: Problem Formulation

An improved strategy for solving Sudoku by sparse optimization methods

Chapter 4 Heuristics & Local Search

isudoku Computing Solutions to Sudoku Puzzles w/ 3 Algorithms by: Gavin Hillebrand Jamie Sparrow Jonathon Makepeace Matthew Harris

Counting Things Solutions

Overview. Initial Screen

MASTER PROOFS through GAMES

Southeastern European Regional Programming Contest Bucharest, Romania Vinnytsya, Ukraine October 21, Problem A Concerts

CS-171, Intro to A.I. Mid-term Exam Winter Quarter, 2015

Sudoku 16 X 16: 100 Sudoku Puzzles Volume 2 By David Badger READ ONLINE

Lecture 20 November 13, 2014

Sudoku an alternative history

EC O4 403 DIGITAL ELECTRONICS

Graphs of Tilings. Patrick Callahan, University of California Office of the President, Oakland, CA

Milton Public Schools Elementary Summer Math

ARITHMOGONS The number in a square must be the sum of the numbers on each side of it.

DOWNLOAD OR READ : CLASSIC SUDOKU 9X9 MEDIUM LEVEL N7 100 MEDIUM SUDOKU PUZZLES FORMAT EASY TO USE AND TO TAKE EVERYWHERE 6X9 PDF EBOOK EPUB MOBI

Computer Science Scholarship Puzzle Packet

Question Score Max Cover Total 149

Hinojosa Kinder Math Vocabulary Words. Topic 1. number. zero. one

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

CS 188 Fall Introduction to Artificial Intelligence Midterm 1

Heuristic Search with Pre-Computed Databases

Rubik's Magic Transforms

CS 171, Intro to A.I. Midterm Exam Fall Quarter, 2016

Episode 3 8 th 12 th February Substitution and Odd Even Variations By Kishore Kumar and Ashish Kumar

ON THE ENUMERATION OF MAGIC CUBES*

Sudoku Squares as Experimental Designs

MATH302: Mathematics & Computing Permutation Puzzles: A Mathematical Perspective

Dynamic Programming. Objective

Sudoku Solver Manual. Version June 2017

(school and non-school related)

The remarkably popular puzzle demonstrates man versus machine, backtraking and recursion, and the mathematics of symmetry.

Surveillance strategies for autonomous mobile robots. Nicola Basilico Department of Computer Science University of Milan

Lesson 1 Meeting the Cube

GET OVERLAPPED! Author: Huang Yi. Forum thread:

Enumerating 3D-Sudoku Solutions over Cubic Prefractal Objects

CS 32 Puzzles, Games & Algorithms Fall 2013

Transcription:

Task Scheduling A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering May 0 Task Scheduling Slide

About This Presentation This presentation belongs to the lecture series entitled Ten Puzzling Problems in Computer Engineering, devised for a ten-week, one-unit, freshman seminar course by Behrooz Parhami, Professor of Computer Engineering at University of California, Santa Barbara. The material can be used freely in teaching and other educational settings. Unauthorized uses, including any use for financial gain, are prohibited. Behrooz Parhami Edition Released Revised Revised Revised Revised First May 00 May 00 May 009 May 00 May 0 May 0 May 0 May 0 May 0 Task Scheduling Slide

Mini-Sudoku Puzzle Complete entries in this chart so that numbers - appear without repetition in each row, each column and each block Standard Sudoku consists of a 9 9 chart, but this mini version is good for a quick fix USA Today carries a daily mini-sudoku at its site: http://puzzles.usatoday.com Sudoku isn t a math puzzle: We can use the letters A-F, or any other six symbols, instead of the numbers - May 0 Task Scheduling Slide

Mini-Sudoku Puzzle: Solution Method Complete entries in this chart so that letters A-F appear without repetition in each row, each column and each block AE C B D D C A To continue from here, write down all possible choices in the remaining blank boxes and see whether the resulting info leads to more progress F B D A C E A C D F SuDoKu: abbr. in Japanese for numbers must be single. Euler may have invented it; Howard Garns (US) & Wayne Gould (HK) popularized it in modern times D C F A AE C D May 0 Task Scheduling Slide

Sudoku Puzzle: Easy Example Complete entries in this chart so that numbers -9 appear without repetition in each row, each column and each block 9 Many newspapers carry these puzzles; there are also many collections in book form Sudoku puzzles of varying difficulties (easy, medium, hard, evil) are available at http://www.websudoku.com and several other Web sites, such as USA Today s site http://puzzles.usatoday.com 9 9 9 May 0 Task Scheduling Slide

Sudoku Puzzle Solution Method Strategy : When you can t make progress by Strategy, write down all candidate numbers in the cells and try to eliminate a number of options via reasoning. For example if xy, xy, xyz are candidates in three cells of a block, then the cell marked xyz must hold z Strategy : Identify a missing number from a row, column, or block; if you can exclude all but one cell for that number, then write it down 9 9 9 9 9 9 9,,,,, 9 missing from this column missing from this row May 0 Task Scheduling Slide

Sudoku Puzzle: Hard Example Complete entries in this chart so that numbers -9 appear without repetition in each row, each column and each block Hard puzzles typically have fewer entries supplied, with each row, column, or block containing only a few entries Hard puzzles may have handles or starting points ( in the top left block or 9 in center and lower right blocks) 9 9 9 9 May 0 Task Scheduling Slide

Constructing a (Mini-)Sudoku Puzzle Begin with a completed puzzle and one by one remove selected entries that can be deduced from the remaining ones This will ensure a unique solution, which is a desirable attribute Interesting fact: In a 9 9 Sudoku puzzle, you may need at least initial entries (clues) for the solution to be unique; no one knows whether a -clue puzzle with unique solution exists May 0 Task Scheduling Slide http://people.csse.uwa.edu.au/gordon/sudokumin.php (Web page devoted to minimum Sudoku)

Variations on Sudoku Other sizes (e.g.,, with blocks; or, with blocks) Combining this 000s phenomenon with Rubik s cube of the 90s... or with the age-old sliding puzzle Latin square May 0 Task Scheduling Slide 9

Task Scheduling Problem We have a set of of tasks There are some processors that can execute tasks Assign tasks to processors so as to meet certain constraints A task may fit only some processors Tasks may have prerequisite tasks Preemption may be (dis)allowed Tasks may have deadlines Shortest schedule may be sought Numbers in Sudoku puzzle Cells in Sudoku puzzle can hold numbers Place numbers in cells while honoring some constraints Use only numbers -9 Some numbers already placed Different numbers in each row Different numbers in each column Different numbers in each block Virtually all instances of the task scheduling problem are difficult (NP-hard), just like Sudoku May 0 Task Scheduling Slide 0

Resource Allocation Problem We have a set of of resources There are locations where resources may be placed Assign resources to locations to meet certain constraints A resource may fit only some locations Resources must be easily accessible Resource mobility may be (dis)allowed Resource cost may differ by location Lowest-cost assignment may be sought Numbers in Sudoku puzzle Cells in Sudoku puzzle can hold numbers Place numbers in cells while honoring some constraints Use only numbers -9 Some numbers already placed Different numbers in each row Different numbers in each column Different numbers in each block Virtually all instances of the resource allocation problem are difficult (NP-hard), just like Sudoku May 0 Task Scheduling Slide

Scheduling Required CE Courses CS 0 Math A Math B ECE Phys Chem A Chem B Chem AL Chem BL Units units CS 0 Math C Phys 0 units CS 0 CS 0 Phys L Phys Math A ECE A Upper - division standing Engr 0 Phys L Phys ECE A ECE B ECE B ECE C Or CS 0 Constraints Prerequisite: Solid downward arrow Corequisite: Dashed sideways arrow Units per quarter: CS 0A CS 0 Or CS 0 Or PSTAT 0A ECE ECE A ECE B ECE 9 May 0 Task Scheduling Slide

Scheduling Required CE Courses CS 0 Math A Math B ECE Phys Chem A Chem B Chem AL Chem BL Units units 0 units CS 0 CS 0 CS 0 Math C Phys L Phys Phys Math A ECE A Upper - division standing Engr 0 Phys L Phys ECE A ECE B ECE B ECE C Or CS 0 Constraints Prerequisite: Solid downward arrow Corequisite: Dashed sideways arrow Units per quarter: CS 0A CS 0 Or CS 0 Or PSTAT 0A ECE ECE A ECE 9 ECE B Almost done! May 0 Task Scheduling Slide

Job Task Machine Time Staff Ja Ta M Ja Ta M Jb Tb M Jb Tb M Jb Tb M Jc Tc M Jd Td M Jd Td M M M M Job-Shop Scheduling S t a f f S t a f f Ta Tb Ta Td Td Tb Tc Tb 0 0 0 Ta Tb Ta Td Tc Td Tb 0 0 0 May 0 Task Scheduling Slide Tb Time Time

Schedule Refinement Job Task Machine Time Staff Ja Ta M Ja Ta M Jb Tb M Jb Tb M Jb Tb M Jc Tc M Jd Td M Jd Td M M M M S t a f f S t a f f 0 0 0 Ta Ta Tb Tb Ta Ta Tb Td Tc Tb Td Switch? Td Tb Tc 0 0 0 May 0 Task Scheduling Slide Tb Td Time Time

Truck Scheduling Seattle Portland Boise 0% Chicago SF % 0% % NYC LA Dallas 0% Orlando Truck location Required trip 00% Truck load May 0 Task Scheduling Slide

Multiprocessor Scheduling Task graph with unit-time tasks Here s a heuristic known as list scheduling:. Find the depth T of the task graph. Take T as a goal for the running time T p. Determine the latest possible start times. Assign priorities in order of latest times T = (execution time goal) Latest start times: see the layered diagram Priorities: shown on the diagram in red When two tasks have the same latest start time, a secondary tie-breaking rule is used Vertex v represents j j Task task or Computation computation j May 0 Task Scheduling Slide x 0 x 0 y T p T Latency p Latency with with p proce p T T Number Number of nodes of nodes (h T T Depth Depth of the of the graph ( x Output Output 9 9

Assignment to Processors Tasks listed in priority order * 9 0 Vertex v represents j j Task task or Computation computation j x x T p T Latency p Latency with with p proce p T T Number Number of nodes of nodes (h T T Depth Depth of the of the graph ( P 9 0 x P P P P P 9 9 0 Even in this simple case of unit-time tasks, multiprocessor scheduling remains difficult with as few as processors 0 9 0 Time Step 0 0 y Output Output 9 9 May 0 Task Scheduling Slide

Two Related and Similar Problems The knapsack problem We have storage capacity W and n files of sizes w i and values v i Pick a max-value subset of files that fit in the storage space W Files cannot be broken into pieces Naïve solution: Examine all n subsets Dynamic programming solution Various heuristic aids Approx. solutions (say, 90% of optimal) Off-line game of Tetris We have a rectangular bin and a sequence of tetrominos Find optimal play to maximize the number of pieces used Pieces can only be rotated Exponentially many choices There are many other related and similarly hard problems, some of which don t even admit efficient approximations May 0 Task Scheduling Slide 9