Goals of this Lecture. Generics(Γενικότητα) Generic Data Structures Example. Generic Data Structures Example

Μέγεθος: px
Εμφάνιση ξεκινά από τη σελίδα:

Download "Goals of this Lecture. Generics(Γενικότητα) Generic Data Structures Example. Generic Data Structures Example"

Transcript

1 Generics(Γενικότητα) Μπορούμε να κατασκευάσουμε ΑΤΔ που επιτρέπει χρήση με διαφορετικούς Τύπους Δεδομένων στο ίδιο πρόγραμμα; Π.χ. Μια στοίβα με char* και μια με int Goals of this Lecture Help you learn about: Generic modules Data structures that can store multiple types of data Functions that can work on multiple types of data How to create generic modules in C Which wasn t designed with generic modules in mind! Why? Reusing existing code is easier/cheaper than writing new code; reuse reduces software costs Generic modules are more reusable than non-generic ones A power programmer knows how to create generic modules A power programmer knows how to use existing generic modules to create large programs 1 2 Generic Data Structures Example Stack void Stack_push(Stack_T s, const char *item); char *Stack_top(Stack_T s); Items are strings (type char*) Generic Data Structures Example Stack operations (push, pop, top, etc.) make sense for items other than strings too So Stack module could (and maybe should) be generic Problem: How to make Stack module generic? How to define Stack module such that a Stack object can store items of any type? 3 4 1

2 Generic Data Structures via typedef Solution 1: Let clients define item type (G2) struct Item { char *str; /* Or whatever is appropriate */ ; struct Item item; item.str = "hello"; Stack_push(s, item); typedef struct Item *Item_T; void Stack_push(Stack_T s, Item_T item); Item_T Stack_top(Stack_T s); Generic Data Structures via typedef Problem: Awkward for client to define structure type and create structures of that type Problem: Client (or some other module in same program) might already use Item_T for some other purpose! Problem: Client might need two Stack objects holding different types of data!!! We need another approach 5 6 Solution 2: The generic pointer (void*) (G3) Can assign a pointer of any type to a void pointer Stack_push(s, "hello"); OK to match an actual parameter of type char* with a formal parameter of type void* 7 8 2

3 Can assign a void pointer to a pointer of any type char *str; Stack_push(s, "hello"); str = Stack_top(s); OK to assign a void* return value to a char* 9 Problem: Client must know what type of data a void pointer is pointing to int *i; Stack_push(s, "hello"); i = Stack_top(s); Client pushes a string Client considers retrieved value to be a pointer to an int! Legal!!! Trouble!!! Solution: None Void pointers subvert the compiler s type checking Programmer s responsibility to avoid type mismatches 10 Problem: Stack items must be pointers E.g. Stack items cannot be of primitive types (int, double, etc.) int i = 5; Stack_push(s, 5); Stack_push(s, &i); Not OK to match an actual parameter of type int with a formal parameter of type void* OK, but Solution: none awkward In C, there is no mechanism to create truly generic data structures (In C++: Use template classes and template functions) (In Java: Use generic classes) 11 Generic Algorithms Example Suppose we wish to add another function to the Stack module int Stack_areEqual(Stack_T s1, Stack_T s2); Returns 1 (TRUE) iff s1 and s2 are equal, that is, contain equal items in the same order 12 3

4 Generic Algorithm Attempt 1 Attempt 1 return s1 == s2; Returns 0 (FALSE) Incorrect! Checks if s1 and s2 are identical, not equal Compares pointers, not items That s not what we want Addresses vs. Values Suppose two locations in memory have the same value int i=5; int j=5; i 5 j 5 The addresses of the variables are notthe same That is (&i==&j) is FALSE Need to compare the values themselves That is (i== j) is TRUE Unfortunately, comparison operation is type specific The == works for integers and floating-point numbers But not for strings and more complex data structures Generic Algorithm Attempt 2 Attempt 2 if (p1!= p2) return 1; Checks if nodes are identical Compares pointers, not items That is stillnot what we want Returns 0 (FALSE) Incorrect! Generic Algorithm Attempt 3 Attempt 3 if (p1->item!= p2->item) return 1; Returns 0 (FALSE) Checks if items are identical Incorrect! Compares pointers to items, not items themselves That is stillnot what we want

5 Generic Algorithm Attempt 4 Attempt 4 if (strcmp(p1->item, p2->item)!= 0) return Checks 1; if items are equal That s what we want But strcmp()works only if items are strings! We need Stack_areEqual() to be generic How to compare values when we don t know their type? Returns 1 (TRUE) Correct! 17 Approach 5 int Stack_areEqual(Stack_T s1, Stack_T s2, int (*cmp)(const void *item1, const void *item2)); Add parameter to Stack_areEqual() Pointer to a compare function, which Accepts two const void * parameters, and Returns an int Allows client to supply the function that Stack_areEqual()should call to compare items 18 int Stack_areEqual(Stack_T s1, Stack_T s2, int (*cmp)(const void *item1, const void *item2)) { if ((*cmp)(p1->item, p2->item)!= 0) return 1; Definition of Stack_areEqual() uses the function pointer to call the clientsupplied compare function Stack_areEqual() calls back into client code 19 int strcompare(const void *item1, const void *item2) { char *str1 = item1; char *str2 = item2; return strcmp(str1, str2); if (Stack_areEqual(s1,s2,strCompare)) { Returns 1 (TRUE) Correct! Client passes address of strcompare() to Stack_areEqual() Client defines callback function, and passes pointer to it to Stack_areEqual() Callback function must match Stack_areEqual() parameter exactly 20 5

6 Alternative: Client defines more natural callback function, and casts it to match Stack_areEqual() parameter int strcompare(const char *str1, const char *str2) { return strcmp(str1, str2); if (Stack_areEqual(s1, s2, (int (*)(const void*, const void*))strcompare)) { Cast operator if (Stack_areEqual(s1, s2, (int (*)(const void*, const void*))strcmp)) { Cast operator Alternative (for string comparisons only): Simply use strcmp() with cast! Summary Generic data structures Via item typedef Safe, but not realistic Via the generic pointer (void*) Limiting: items must be pointers Dangerous: subverts compiler type checking The best we can do in C (See C++ template classes and Java generics for other approaches) Generic algorithms Via function pointers and callback functions Genericity ΤΣ καθορισμένος στον κώδικα, χωρίς αφαίρεση ΤΣ #include σε.h (και αντίστοιχο.c) ΤΣ (Πλήρης απόκρυψη και ΤΣ *Τ)(παράμετροι συναρτήσεων και data του ΑΤΔ είναι *Τ) ΤΣ (Πλήρης απόκρυψη ΤΣ *Τ)(παράμετροι συναρτήσεων και data του ΑΤΔ είναι void*) + Υλοποίηση Ενοτήτων (Modules) στην C και Γενικότητα (Genericity) Modularity No Modularity (0) Απόκρυψη Πράξεων (ΜΑ) (1) Απόκρυψη Δεδομένων και Πράξεων (ΠΑ)(2,3) + - ΌΧΙ (Demo Mod 0) ΌΧΙ λόγω G (Demo Mod 1) ΌΧΙ λόγω G (Demo Mod 3+2) έλεγχος μεταγλώττισης ΌΧΙ λόγω Modularity ΌΧΙ λόγω Modularity ΌΧΙ λόγω Modularity Να αποφεύγεται εντελώς, καμία -απόκρυψη NAI με Προσοχή όπως ουρά 1ης άσκησης Χωρίς ιδιαίτερο όφελος Χωρίς ιδιαίτερο όφελος Καλή προσέγγιση, προσοχή στην άμεση χρήση στον Τύπο. Κίνδυνοι άμεσης πρόσβασης στον ΤΑ, αλλοίωση απόκρυψης Αλλαγή ΤΣ δεν απαιτεί αλλαγή ΝΑΙ (απλό με πολλά πλεονεκτήματα) υλοποίησης ΑΤΔ, έλεγχος ουρά 2ης άσκησης μεταγλώττισης Αλλαγή ΤΣ δεν απαιτεί αλλαγή ΝΑΙ, απαιτεί καλή χρήση δεικτών υλοποίησης ΑΤΔ, δεν απαιτεί Mod 3 Gen 1-T (SetValue recompilation, έλεγχος απλουστεύεται)(compare) μεταγλώττισης 1 μόνο ΤΣ, Αλλαγή ΤΣ απαιτεί Αλλαγή Υλοποίησης ΑΤΔ, απαιτεί recompilation 1 μόνο ΤΣ, Αλλαγή ΤΑ απαιτεί recompilation 1 μόνο ΤΣ Χρήσιμη για βιβλιοθήκες, απαιτεί πολλά-τσ, σταθερή υλοποίηση ΑΤΔ, καλούς ελέγχους. Mod 3 Gen n-type χωρίς έλεγχο μεταγλώττισης δεν απαιτεί recompilation (compare) Η καλύτερη απόκρυψη Διαχειριζόμαστε δείκτες και όχι structs 1 ΤΣ μπορεί να καλύπτει πολλούς τύπους με union

Generics (Γενικότθτα)

Generics (Γενικότθτα) Generics (Γενικότθτα) Μποροφμε να καταςκευάςουμε ΑΤΔ που επιτρζπει χριςθ με διαφορετικοφσ Τφπουσ Δεδομζνων ςτο ίδιο πρόγραμμα; Π.χ. Μια ςτοίβα με char* και μια με int 1 Goals of this Lecture Help you learn

Διαβάστε περισσότερα

The Simply Typed Lambda Calculus

The Simply Typed Lambda Calculus Type Inference Instead of writing type annotations, can we use an algorithm to infer what the type annotations should be? That depends on the type system. For simple type systems the answer is yes, and

Διαβάστε περισσότερα

Instruction Execution Times

Instruction Execution Times 1 C Execution Times InThisAppendix... Introduction DL330 Execution Times DL330P Execution Times DL340 Execution Times C-2 Execution Times Introduction Data Registers This appendix contains several tables

Διαβάστε περισσότερα

2 Composition. Invertible Mappings

2 Composition. Invertible Mappings Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan Composition. Invertible Mappings In this section we discuss two procedures for creating new mappings from old ones, namely,

Διαβάστε περισσότερα

HY150a Φροντιστήριο 3 24/11/2017

HY150a Φροντιστήριο 3 24/11/2017 HY150a Φροντιστήριο 3 24/11/2017 1 Assignment 3 Overview Το πρόγραμμα ζητείται να διαβάζει μια λίστα δεδομένων που περιγράφει τα διαθέσιμα τμήματα μνήμης (blocks) ενός ΗΥ. Το πρόγραμμα ζητείται να μεταφορτώνει

Διαβάστε περισσότερα

Other Test Constructions: Likelihood Ratio & Bayes Tests

Other Test Constructions: Likelihood Ratio & Bayes Tests Other Test Constructions: Likelihood Ratio & Bayes Tests Side-Note: So far we have seen a few approaches for creating tests such as Neyman-Pearson Lemma ( most powerful tests of H 0 : θ = θ 0 vs H 1 :

Διαβάστε περισσότερα

EE512: Error Control Coding

EE512: Error Control Coding EE512: Error Control Coding Solution for Assignment on Finite Fields February 16, 2007 1. (a) Addition and Multiplication tables for GF (5) and GF (7) are shown in Tables 1 and 2. + 0 1 2 3 4 0 0 1 2 3

Διαβάστε περισσότερα

Finite Field Problems: Solutions

Finite Field Problems: Solutions Finite Field Problems: Solutions 1. Let f = x 2 +1 Z 11 [x] and let F = Z 11 [x]/(f), a field. Let Solution: F =11 2 = 121, so F = 121 1 = 120. The possible orders are the divisors of 120. Solution: The

Διαβάστε περισσότερα

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 5: Component Adaptation Environment (COPE)

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 5: Component Adaptation Environment (COPE) EPL 603 TOPICS IN SOFTWARE ENGINEERING Lab 5: Component Adaptation Environment (COPE) Performing Static Analysis 1 Class Name: The fully qualified name of the specific class Type: The type of the class

Διαβάστε περισσότερα

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required) Phys460.nb 81 ψ n (t) is still the (same) eigenstate of H But for tdependent H. The answer is NO. 5.5.5. Solution for the tdependent Schrodinger s equation If we assume that at time t 0, the electron starts

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Αν κάπου κάνετε κάποιες υποθέσεις να αναφερθούν στη σχετική ερώτηση. Όλα τα αρχεία που αναφέρονται στα προβλήματα βρίσκονται στον ίδιο φάκελο με το εκτελέσιμο

Διαβάστε περισσότερα

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016 Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Dynamic types, Lambda calculus machines Apr 21 22, 2016 1 Dynamic types and contracts (a) To make sure you understand the

Διαβάστε περισσότερα

ΑΦAΙΡΕΤΙΚΟΣ (ή ΑΦΗΡΗΜΕΝΟΣ) ΤΥΠΟΣ ΔΕΔΟΜΕΝΩΝ (ΑΤΔ) (Abstract Data Type-ADT) - σύνολο δεδομένων (data, objects) - σύνολο πράξεων στα δεδομένα

ΑΦAΙΡΕΤΙΚΟΣ (ή ΑΦΗΡΗΜΕΝΟΣ) ΤΥΠΟΣ ΔΕΔΟΜΕΝΩΝ (ΑΤΔ) (Abstract Data Type-ADT) - σύνολο δεδομένων (data, objects) - σύνολο πράξεων στα δεδομένα Τύπος Δεδομένων: ΑΦAΙΡΕΤΙΚΟΣ (ή ΑΦΗΡΗΜΕΝΟΣ) ΤΥΠΟΣ ΔΕΔΟΜΕΝΩΝ (ΑΤΔ) (Abstract Data Type-ADT) - σύνολο δεδομένων (data, objects) - σύνολο πράξεων στα δεδομένα - Ένας ΑΤΔ είναι ένα μαθηματικό μοντέλο (οντότητα)

Διαβάστε περισσότερα

Μορφοποίηση υπό όρους : Μορφή > Μορφοποίηση υπό όρους/γραμμές δεδομένων/μορφοποίηση μόο των κελιών που περιέχουν/

Μορφοποίηση υπό όρους : Μορφή > Μορφοποίηση υπό όρους/γραμμές δεδομένων/μορφοποίηση μόο των κελιών που περιέχουν/ Μορφοποίηση υπό όρους : Μορφή > Μορφοποίηση υπό όρους/γραμμές δεδομένων/μορφοποίηση μόο των κελιών που περιέχουν/ Συνάρτηση round() Περιγραφή Η συνάρτηση ROUND στρογγυλοποιεί έναν αριθμό στον δεδομένο

Διαβάστε περισσότερα

SOAP API. https://bulksmsn.gr. Table of Contents

SOAP API. https://bulksmsn.gr. Table of Contents SOAP API https://bulksmsn.gr Table of Contents Send SMS...2 Query SMS...3 Multiple Query SMS...4 Credits...5 Save Contact...5 Delete Contact...7 Delete Message...8 Email: sales@bulksmsn.gr, Τηλ: 211 850

Διαβάστε περισσότερα

ΔΟΜΕΣ ΔΕΔΟΜΕΝΩΝ & ΑΛΓΟΡΙΘΜΟΙ ΕΡΓΑΣΤΗΡΙΟ

ΔΟΜΕΣ ΔΕΔΟΜΕΝΩΝ & ΑΛΓΟΡΙΘΜΟΙ ΕΡΓΑΣΤΗΡΙΟ ΔΟΜΕΣ ΔΕΔΟΜΕΝΩΝ & ΑΛΓΟΡΙΘΜΟΙ ΕΡΓΑΣΤΗΡΙΟ Κωδικός Θ: ΤΠ3001, Κωδικός Ε: ΤΠ3101 (ΜΕΥ/Υ) Ώρες (Θ - Ε): 4-2 Προαπαιτούμενα: Δρ. ΒΙΔΑΚΗΣ ΝΙΚΟΣ ΕΡΓΑΣΤΗΡΙΟ 6 Στοίβα (Stack) Stack Introduction Stack is one of the

Διαβάστε περισσότερα

ΤΥΠΟΣ ΔΕΔΟΜΕΝΩΝ (ΑΤΔ) (Abstract Data Type-ADT)

ΤΥΠΟΣ ΔΕΔΟΜΕΝΩΝ (ΑΤΔ) (Abstract Data Type-ADT) Τύπος Δεδομένων: ΑΦAΙΡΕΤΙΚΟΣ (ή ΑΦΗΡΗΜΕΝΟΣ) ΤΥΠΟΣ ΔΕΔΟΜΕΝΩΝ (ΑΤΔ) (Abstract Data Type-ADT) - σύνολο δεδομένων (data, objects) - σύνολο πράξεων στα δεδομένα - Ένας ΑΤΔ είναι ένα μαθηματικό μοντέλο (οντότητα)

Διαβάστε περισσότερα

Μηχανική Μάθηση Hypothesis Testing

Μηχανική Μάθηση Hypothesis Testing ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Μηχανική Μάθηση Hypothesis Testing Γιώργος Μπορμπουδάκης Τμήμα Επιστήμης Υπολογιστών Procedure 1. Form the null (H 0 ) and alternative (H 1 ) hypothesis 2. Consider

Διαβάστε περισσότερα

Lecture 2. Soundness and completeness of propositional logic

Lecture 2. Soundness and completeness of propositional logic Lecture 2 Soundness and completeness of propositional logic February 9, 2004 1 Overview Review of natural deduction. Soundness and completeness. Semantics of propositional formulas. Soundness proof. Completeness

Διαβάστε περισσότερα

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο Procedures and Functions Stored procedures and functions are named blocks of code that enable you to group and organize a series of SQL and PL/SQL

Διαβάστε περισσότερα

derivation of the Laplacian from rectangular to spherical coordinates

derivation of the Laplacian from rectangular to spherical coordinates derivation of the Laplacian from rectangular to spherical coordinates swapnizzle 03-03- :5:43 We begin by recognizing the familiar conversion from rectangular to spherical coordinates (note that φ is used

Διαβάστε περισσότερα

Homework 3 Solutions

Homework 3 Solutions Homework 3 Solutions Igor Yanovsky (Math 151A TA) Problem 1: Compute the absolute error and relative error in approximations of p by p. (Use calculator!) a) p π, p 22/7; b) p π, p 3.141. Solution: For

Διαβάστε περισσότερα

Models for Probabilistic Programs with an Adversary

Models for Probabilistic Programs with an Adversary Models for Probabilistic Programs with an Adversary Robert Rand, Steve Zdancewic University of Pennsylvania Probabilistic Programming Semantics 2016 Interactive Proofs 2/47 Interactive Proofs 2/47 Interactive

Διαβάστε περισσότερα

TMA4115 Matematikk 3

TMA4115 Matematikk 3 TMA4115 Matematikk 3 Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet Trondheim Spring 2010 Lecture 12: Mathematics Marvellous Matrices Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet

Διαβάστε περισσότερα

About these lecture notes. Simply Typed λ-calculus. Types

About these lecture notes. Simply Typed λ-calculus. Types About these lecture notes Simply Typed λ-calculus Akim Demaille akim@lrde.epita.fr EPITA École Pour l Informatique et les Techniques Avancées Many of these slides are largely inspired from Andrew D. Ker

Διαβάστε περισσότερα

ST5224: Advanced Statistical Theory II

ST5224: Advanced Statistical Theory II ST5224: Advanced Statistical Theory II 2014/2015: Semester II Tutorial 7 1. Let X be a sample from a population P and consider testing hypotheses H 0 : P = P 0 versus H 1 : P = P 1, where P j is a known

Διαβάστε περισσότερα

Test Data Management in Practice

Test Data Management in Practice Problems, Concepts, and the Swisscom Test Data Organizer Do you have issues with your legal and compliance department because test environments contain sensitive data outsourcing partners must not see?

Διαβάστε περισσότερα

Fractional Colorings and Zykov Products of graphs

Fractional Colorings and Zykov Products of graphs Fractional Colorings and Zykov Products of graphs Who? Nichole Schimanski When? July 27, 2011 Graphs A graph, G, consists of a vertex set, V (G), and an edge set, E(G). V (G) is any finite set E(G) is

Διαβάστε περισσότερα

ΕΙΣΑΓΩΓΗ ΣΤΟN ΠΡΟΓΡΑΜΜΑΤΙΣΜΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΠΟΛΥΤΕΧΝΙΚΗ ΣΧΟΛΗ ΤΜΗΜΑ ΜΗΧΑΝΙΚΩΝ Η/Υ ΚΑΙ ΠΛΗΡΟΦΟΡΙΚΗΣ

ΕΙΣΑΓΩΓΗ ΣΤΟN ΠΡΟΓΡΑΜΜΑΤΙΣΜΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΠΟΛΥΤΕΧΝΙΚΗ ΣΧΟΛΗ ΤΜΗΜΑ ΜΗΧΑΝΙΚΩΝ Η/Υ ΚΑΙ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΙΣΑΓΩΓΗ ΣΤΟN ΠΡΟΓΡΑΜΜΑΤΙΣΜΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΠΟΛΥΤΕΧΝΙΚΗ ΣΧΟΛΗ ΤΜΗΜΑ ΜΗΧΑΝΙΚΩΝ Η/Υ ΚΑΙ ΠΛΗΡΟΦΟΡΙΚΗΣ Εμβέλεια Μεταβλητών Εμβέλεια = το τμήμα του προγράμματος στο οποίο έχει ισχύ ή είναι ορατή η μεταβλητή.

Διαβάστε περισσότερα

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch: HOMEWORK 4 Problem a For the fast loading case, we want to derive the relationship between P zz and λ z. We know that the nominal stress is expressed as: P zz = ψ λ z where λ z = λ λ z. Therefore, applying

Διαβάστε περισσότερα

Section 8.3 Trigonometric Equations

Section 8.3 Trigonometric Equations 99 Section 8. Trigonometric Equations Objective 1: Solve Equations Involving One Trigonometric Function. In this section and the next, we will exple how to solving equations involving trigonometric functions.

Διαβάστε περισσότερα

Concrete Mathematics Exercises from 30 September 2016

Concrete Mathematics Exercises from 30 September 2016 Concrete Mathematics Exercises from 30 September 2016 Silvio Capobianco Exercise 1.7 Let H(n) = J(n + 1) J(n). Equation (1.8) tells us that H(2n) = 2, and H(2n+1) = J(2n+2) J(2n+1) = (2J(n+1) 1) (2J(n)+1)

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Ολοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα είναι μικρότεροι το 1000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Διάρκεια: 3,5 ώρες Καλή

Διαβάστε περισσότερα

Lab 1: C/C++ Pointers and time.h. Panayiotis Charalambous 1

Lab 1: C/C++ Pointers and time.h. Panayiotis Charalambous 1 Lab 1: C/C++ Pointers and time.h Panayiotis Charalambous 1 Send email to totis@cs.ucy.ac.cy Subject: EPL231-Registration Body: Surname Firstname ID Group A or B? Panayiotis Charalambous 2 Code Guidelines:

Διαβάστε περισσότερα

4.6 Autoregressive Moving Average Model ARMA(1,1)

4.6 Autoregressive Moving Average Model ARMA(1,1) 84 CHAPTER 4. STATIONARY TS MODELS 4.6 Autoregressive Moving Average Model ARMA(,) This section is an introduction to a wide class of models ARMA(p,q) which we will consider in more detail later in this

Διαβάστε περισσότερα

SUPERPOSITION, MEASUREMENT, NORMALIZATION, EXPECTATION VALUES. Reading: QM course packet Ch 5 up to 5.6

SUPERPOSITION, MEASUREMENT, NORMALIZATION, EXPECTATION VALUES. Reading: QM course packet Ch 5 up to 5.6 SUPERPOSITION, MEASUREMENT, NORMALIZATION, EXPECTATION VALUES Readig: QM course packet Ch 5 up to 5. 1 ϕ (x) = E = π m( a) =1,,3,4,5 for xa (x) = πx si L L * = πx L si L.5 ϕ' -.5 z 1 (x) = L si

Διαβάστε περισσότερα

Lab 1: C/C++ Pointers and time.h. Panayiotis Charalambous 1

Lab 1: C/C++ Pointers and time.h. Panayiotis Charalambous 1 Lab 1: C/C++ Pointers and time.h Panayiotis Charalambous 1 Send email to totis@cs.ucy.ac.cy Subject: EPL231-Registration Body: Surname Firstname ID Group A or B? Panayiotis Charalambous 2 Code Guidelines:

Διαβάστε περισσότερα

ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ - ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΠΛ 133: ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΕΦΗΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial

ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ - ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΠΛ 133: ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΕΦΗΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial Introduction Το Javadoc είναι ένα εργαλείο που παράγει αρχεία html (παρόμοιο με τις σελίδες στη διεύθυνση http://docs.oracle.com/javase/8/docs/api/index.html) από τα σχόλια

Διαβάστε περισσότερα

The challenges of non-stable predicates

The challenges of non-stable predicates The challenges of non-stable predicates Consider a non-stable predicate Φ encoding, say, a safety property. We want to determine whether Φ holds for our program. The challenges of non-stable predicates

Διαβάστε περισσότερα

Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook

Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook Βήμα 1: Step 1: Βρείτε το βιβλίο που θα θέλατε να αγοράσετε και πατήστε Add to Cart, για να το προσθέσετε στο καλάθι σας. Αυτόματα θα

Διαβάστε περισσότερα

Statistical Inference I Locally most powerful tests

Statistical Inference I Locally most powerful tests Statistical Inference I Locally most powerful tests Shirsendu Mukherjee Department of Statistics, Asutosh College, Kolkata, India. shirsendu st@yahoo.co.in So far we have treated the testing of one-sided

Διαβάστε περισσότερα

Modbus basic setup notes for IO-Link AL1xxx Master Block

Modbus basic setup notes for IO-Link AL1xxx Master Block n Modbus has four tables/registers where data is stored along with their associated addresses. We will be using the holding registers from address 40001 to 49999 that are R/W 16 bit/word. Two tables that

Διαβάστε περισσότερα

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Chapter 6: Systems of Linear Differential. be continuous functions on the interval Chapter 6: Systems of Linear Differential Equations Let a (t), a 2 (t),..., a nn (t), b (t), b 2 (t),..., b n (t) be continuous functions on the interval I. The system of n first-order differential equations

Διαβάστε περισσότερα

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics Fourier Series MATH 211, Calculus II J. Robert Buchanan Department of Mathematics Spring 2018 Introduction Not all functions can be represented by Taylor series. f (k) (c) A Taylor series f (x) = (x c)

Διαβάστε περισσότερα

Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά.

Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά. Διαστημικό εστιατόριο του (Μ)ΑστροΈκτορα Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά. Μόλις μια παρέα πελατών κάτσει σε ένα

Διαβάστε περισσότερα

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8  questions or comments to Dan Fetter 1 Eon : Fall 8 Suggested Solutions to Problem Set 8 Email questions or omments to Dan Fetter Problem. Let X be a salar with density f(x, θ) (θx + θ) [ x ] with θ. (a) Find the most powerful level α test

Διαβάστε περισσότερα

6.3 Forecasting ARMA processes

6.3 Forecasting ARMA processes 122 CHAPTER 6. ARMA MODELS 6.3 Forecasting ARMA processes The purpose of forecasting is to predict future values of a TS based on the data collected to the present. In this section we will discuss a linear

Διαβάστε περισσότερα

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit Ting Zhang Stanford May 11, 2001 Stanford, 5/11/2001 1 Outline Ordinal Classification Ordinal Addition Ordinal Multiplication Ordinal

Διαβάστε περισσότερα

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω 0 1 2 3 4 5 6 ω ω + 1 ω + 2 ω + 3 ω + 4 ω2 ω2 + 1 ω2 + 2 ω2 + 3 ω3 ω3 + 1 ω3 + 2 ω4 ω4 + 1 ω5 ω 2 ω 2 + 1 ω 2 + 2 ω 2 + ω ω 2 + ω + 1 ω 2 + ω2 ω 2 2 ω 2 2 + 1 ω 2 2 + ω ω 2 3 ω 3 ω 3 + 1 ω 3 + ω ω 3 +

Διαβάστε περισσότερα

Section 7.6 Double and Half Angle Formulas

Section 7.6 Double and Half Angle Formulas 09 Section 7. Double and Half Angle Fmulas To derive the double-angles fmulas, we will use the sum of two angles fmulas that we developed in the last section. We will let α θ and β θ: cos(θ) cos(θ + θ)

Διαβάστε περισσότερα

Example Sheet 3 Solutions

Example Sheet 3 Solutions Example Sheet 3 Solutions. i Regular Sturm-Liouville. ii Singular Sturm-Liouville mixed boundary conditions. iii Not Sturm-Liouville ODE is not in Sturm-Liouville form. iv Regular Sturm-Liouville note

Διαβάστε περισσότερα

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1. Exercises 0 More exercises are available in Elementary Differential Equations. If you have a problem to solve any of them, feel free to come to office hour. Problem Find a fundamental matrix of the given

Διαβάστε περισσότερα

Numerical Analysis FMN011

Numerical Analysis FMN011 Numerical Analysis FMN011 Carmen Arévalo Lund University carmen@maths.lth.se Lecture 12 Periodic data A function g has period P if g(x + P ) = g(x) Model: Trigonometric polynomial of order M T M (x) =

Διαβάστε περισσότερα

Paper Reference. Paper Reference(s) 1776/04 Edexcel GCSE Modern Greek Paper 4 Writing. Thursday 21 May 2009 Afternoon Time: 1 hour 15 minutes

Paper Reference. Paper Reference(s) 1776/04 Edexcel GCSE Modern Greek Paper 4 Writing. Thursday 21 May 2009 Afternoon Time: 1 hour 15 minutes Centre No. Candidate No. Paper Reference(s) 1776/04 Edexcel GCSE Modern Greek Paper 4 Writing Thursday 21 May 2009 Afternoon Time: 1 hour 15 minutes Materials required for examination Nil Paper Reference

Διαβάστε περισσότερα

Lecture 34 Bootstrap confidence intervals

Lecture 34 Bootstrap confidence intervals Lecture 34 Bootstrap confidence intervals Confidence Intervals θ: an unknown parameter of interest We want to find limits θ and θ such that Gt = P nˆθ θ t If G 1 1 α is known, then P θ θ = P θ θ = 1 α

Διαβάστε περισσότερα

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible. B-Trees Index files can become quite large for large main files Indices on index files are possible 3 rd -level index 2 nd -level index 1 st -level index Main file 1 The 1 st -level index consists of pairs

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Όλοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα μικρότεροι του 10000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Αν κάπου κάνετε κάποιες υποθέσεις

Διαβάστε περισσότερα

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο Oracle SQL Developer An Oracle Database stores and organizes information. Oracle SQL Developer is a tool for accessing and maintaining the data

Διαβάστε περισσότερα

Κατανεμημένα Συστήματα. Javascript LCR example

Κατανεμημένα Συστήματα. Javascript LCR example Κατανεμημένα Συστήματα Javascript LCR example Javascript JavaScript All JavaScript is the scripting language of the Web. modern HTML pages are using JavaScript to add functionality, validate input, communicate

Διαβάστε περισσότερα

ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ

ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ Ενότητα 12: Συνοπτική Παρουσίαση Ανάπτυξης Κώδικα με το Matlab Σαμαράς Νικόλαος Άδειες Χρήσης Το παρόν εκπαιδευτικό υλικό υπόκειται σε άδειες χρήσης Creative Commons.

Διαβάστε περισσότερα

Πανεπιστήμιο Δυτικής Μακεδονίας. Τμήμα Μηχανικών Πληροφορικής & Τηλεπικοινωνιών. Ηλεκτρονική Υγεία

Πανεπιστήμιο Δυτικής Μακεδονίας. Τμήμα Μηχανικών Πληροφορικής & Τηλεπικοινωνιών. Ηλεκτρονική Υγεία Τμήμα Μηχανικών Πληροφορικής & Τηλεπικοινωνιών Ηλεκτρονική Υγεία Ενότητα: Use Case - an example of ereferral workflow Αν. καθηγητής Αγγελίδης Παντελής e-mail: paggelidis@uowm.gr Τμήμα Μηχανικών Πληροφορικής

Διαβάστε περισσότερα

Every set of first-order formulas is equivalent to an independent set

Every set of first-order formulas is equivalent to an independent set Every set of first-order formulas is equivalent to an independent set May 6, 2008 Abstract A set of first-order formulas, whatever the cardinality of the set of symbols, is equivalent to an independent

Διαβάστε περισσότερα

Web Data Mining ΕΡΓΑΣΤΗΡΙΟ 2 & 3. Prepared by Costantinos Costa Edited by George Nikolaides. EPL 451 - Data Mining on the Web

Web Data Mining ΕΡΓΑΣΤΗΡΙΟ 2 & 3. Prepared by Costantinos Costa Edited by George Nikolaides. EPL 451 - Data Mining on the Web EPL 451 - Data Mining on the Web Web Data Mining ΕΡΓΑΣΤΗΡΙΟ 2 & 3 Prepared by Costantinos Costa Edited by George Nikolaides Semester Project Microsoft Malware Classification Challenge (BIG 2015) More info:

Διαβάστε περισσότερα

alpha Language age (3/5) alpha Language Φροντιστήριο Syntax Directed Translation and

alpha Language age (3/5) alpha Language Φροντιστήριο Syntax Directed Translation and alpha Language (1/5) ΗΥ-340 Γλώσσες και Μεταφραστές Φροντιστήριο Syntax Directed Translation and alpha Language Στην alpha δεν υπάρχει main() συνάρτηση, ο κώδικας ξεκινάει την εκτέλεση από την αρχή του

Διαβάστε περισσότερα

C.S. 430 Assignment 6, Sample Solutions

C.S. 430 Assignment 6, Sample Solutions C.S. 430 Assignment 6, Sample Solutions Paul Liu November 15, 2007 Note that these are sample solutions only; in many cases there were many acceptable answers. 1 Reynolds Problem 10.1 1.1 Normal-order

Διαβάστε περισσότερα

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β 3.4 SUM AND DIFFERENCE FORMULAS Page Theorem cos(αβ cos α cos β -sin α cos(α-β cos α cos β sin α NOTE: cos(αβ cos α cos β cos(α-β cos α -cos β Proof of cos(α-β cos α cos β sin α Let s use a unit circle

Διαβάστε περισσότερα

Bounding Nonsplitting Enumeration Degrees

Bounding Nonsplitting Enumeration Degrees Bounding Nonsplitting Enumeration Degrees Thomas F. Kent Andrea Sorbi Università degli Studi di Siena Italia July 18, 2007 Goal: Introduce a form of Σ 0 2-permitting for the enumeration degrees. Till now,

Διαβάστε περισσότερα

Συστήματα Διαχείρισης Βάσεων Δεδομένων

Συστήματα Διαχείρισης Βάσεων Δεδομένων ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Συστήματα Διαχείρισης Βάσεων Δεδομένων Φροντιστήριο 9: Transactions - part 1 Δημήτρης Πλεξουσάκης Τμήμα Επιστήμης Υπολογιστών Tutorial on Undo, Redo and Undo/Redo

Διαβάστε περισσότερα

Inverse trigonometric functions & General Solution of Trigonometric Equations. ------------------ ----------------------------- -----------------

Inverse trigonometric functions & General Solution of Trigonometric Equations. ------------------ ----------------------------- ----------------- Inverse trigonometric functions & General Solution of Trigonometric Equations. 1. Sin ( ) = a) b) c) d) Ans b. Solution : Method 1. Ans a: 17 > 1 a) is rejected. w.k.t Sin ( sin ) = d is rejected. If sin

Διαβάστε περισσότερα

Εισαγωγή στην Γλώσσα Προγραμματισμού Python. 12/10/16 1

Εισαγωγή στην Γλώσσα Προγραμματισμού Python. 12/10/16 1 Εισαγωγή στην Γλώσσα Προγραμματισμού Python 12/10/16 costis@teicrete.gr 1 Διάφορες Γλώσσες Προγραμματισμού C or C++ Java Perl Scheme Fortran Python Matlab 12/10/16 costis@teicrete.gr 2 Περίληψη Παρουσίασης

Διαβάστε περισσότερα

Section 9.2 Polar Equations and Graphs

Section 9.2 Polar Equations and Graphs 180 Section 9. Polar Equations and Graphs In this section, we will be graphing polar equations on a polar grid. In the first few examples, we will write the polar equation in rectangular form to help identify

Διαβάστε περισσότερα

Solutions to the Schrodinger equation atomic orbitals. Ψ 1 s Ψ 2 s Ψ 2 px Ψ 2 py Ψ 2 pz

Solutions to the Schrodinger equation atomic orbitals. Ψ 1 s Ψ 2 s Ψ 2 px Ψ 2 py Ψ 2 pz Solutions to the Schrodinger equation atomic orbitals Ψ 1 s Ψ 2 s Ψ 2 px Ψ 2 py Ψ 2 pz ybridization Valence Bond Approach to bonding sp 3 (Ψ 2 s + Ψ 2 px + Ψ 2 py + Ψ 2 pz) sp 2 (Ψ 2 s + Ψ 2 px + Ψ 2 py)

Διαβάστε περισσότερα

( ) 2 and compare to M.

( ) 2 and compare to M. Problems and Solutions for Section 4.2 4.9 through 4.33) 4.9 Calculate the square root of the matrix 3!0 M!0 8 Hint: Let M / 2 a!b ; calculate M / 2!b c ) 2 and compare to M. Solution: Given: 3!0 M!0 8

Διαβάστε περισσότερα

Partial Differential Equations in Biology The boundary element method. March 26, 2013

Partial Differential Equations in Biology The boundary element method. March 26, 2013 The boundary element method March 26, 203 Introduction and notation The problem: u = f in D R d u = ϕ in Γ D u n = g on Γ N, where D = Γ D Γ N, Γ D Γ N = (possibly, Γ D = [Neumann problem] or Γ N = [Dirichlet

Διαβάστε περισσότερα

Chapter 29. Adjectival Participle

Chapter 29. Adjectival Participle Chapter 29 Adjectival Participle Overview (29.3-5) Definition: Verbal adjective Function: they may function adverbially or adjectivally Forms: No new forms because adverbial and adjectival participles

Διαβάστε περισσότερα

(C) 2010 Pearson Education, Inc. All rights reserved.

(C) 2010 Pearson Education, Inc. All rights reserved. Connectionless transmission with datagrams. Connection-oriented transmission is like the telephone system You dial and are given a connection to the telephone of fthe person with whom you wish to communicate.

Διαβάστε περισσότερα

Εγκατάσταση λογισμικού και αναβάθμιση συσκευής Device software installation and software upgrade

Εγκατάσταση λογισμικού και αναβάθμιση συσκευής Device software installation and software upgrade Για να ελέγξετε το λογισμικό που έχει τώρα η συσκευή κάντε κλικ Menu > Options > Device > About Device Versions. Στο πιο κάτω παράδειγμα η συσκευή έχει έκδοση λογισμικού 6.0.0.546 με πλατφόρμα 6.6.0.207.

Διαβάστε περισσότερα

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1 Conceptual Questions. State a Basic identity and then verify it. a) Identity: Solution: One identity is cscθ) = sinθ) Practice Exam b) Verification: Solution: Given the point of intersection x, y) of the

Διαβάστε περισσότερα

Στοίβες - Ουρές. Στοίβα (stack) Γιάννης Θεοδωρίδης, Νίκος Πελέκης, Άγγελος Πικράκης Τµήµα Πληροφορικής

Στοίβες - Ουρές. Στοίβα (stack) Γιάννης Θεοδωρίδης, Νίκος Πελέκης, Άγγελος Πικράκης Τµήµα Πληροφορικής Στοίβες - Ουρές Γιάννης Θεοδωρίδης, Νίκος Πελέκης, Άγγελος Πικράκης Τµήµα Πληροφορικής οµές εδοµένων 1 Στοίβα (stack) οµή τύπουlifo: Last In - First Out (τελευταία εισαγωγή πρώτη εξαγωγή) Περιορισµένος

Διαβάστε περισσότερα

Code Breaker. TEACHER s NOTES

Code Breaker. TEACHER s NOTES TEACHER s NOTES Time: 50 minutes Learning Outcomes: To relate the genetic code to the assembly of proteins To summarize factors that lead to different types of mutations To distinguish among positive,

Διαβάστε περισσότερα

Démographie spatiale/spatial Demography

Démographie spatiale/spatial Demography ΠΑΝΕΠΙΣΤΗΜΙΟ ΘΕΣΣΑΛΙΑΣ Démographie spatiale/spatial Demography Session 1: Introduction to spatial demography Basic concepts Michail Agorastakis Department of Planning & Regional Development Άδειες Χρήσης

Διαβάστε περισσότερα

Ενότητες στην C Τεχνική Υλοποίησης Αφαιρετικών Τύπων Δεδομένων στην C

Ενότητες στην C Τεχνική Υλοποίησης Αφαιρετικών Τύπων Δεδομένων στην C Ενότητες στην C Τεχνική Υλοποίησης Αφαιρετικών Τύπων Δεδομένων στην C Δυσκολία: Προγράμματα που λύνουν «πραγματικά προβλήματα» μπορεί να είναι μεγάλα (χιλιάδες ή εκατομμύρια γραμμές κώδικα). Κανείς δεν

Διαβάστε περισσότερα

Math 6 SL Probability Distributions Practice Test Mark Scheme

Math 6 SL Probability Distributions Practice Test Mark Scheme Math 6 SL Probability Distributions Practice Test Mark Scheme. (a) Note: Award A for vertical line to right of mean, A for shading to right of their vertical line. AA N (b) evidence of recognizing symmetry

Διαβάστε περισσότερα

Block Ciphers Modes. Ramki Thurimella

Block Ciphers Modes. Ramki Thurimella Block Ciphers Modes Ramki Thurimella Only Encryption I.e. messages could be modified Should not assume that nonsensical messages do no harm Always must be combined with authentication 2 Padding Must be

Διαβάστε περισσότερα

ΑΥΤΟΜΑΤΟΠΟΙΗΣΗ ΜΟΝΑΔΑΣ ΘΡΑΥΣΤΗΡΑ ΜΕ ΧΡΗΣΗ P.L.C. AUTOMATION OF A CRUSHER MODULE USING P.L.C.

ΑΥΤΟΜΑΤΟΠΟΙΗΣΗ ΜΟΝΑΔΑΣ ΘΡΑΥΣΤΗΡΑ ΜΕ ΧΡΗΣΗ P.L.C. AUTOMATION OF A CRUSHER MODULE USING P.L.C. ΤΕΧΝΟΛΟΓΙΚΟ ΕΚΠΑΙΔΕΥΤΙΚΟ ΙΔΡΥΜΑ ΑΝ. ΜΑΚΕΔΟΝΙΑΣ ΚΑΙ ΘΡΑΚΗΣ ΣΧΟΛΗ ΤΕΧΝΟΛΟΓΙΚΩΝ ΕΦΑΡΜΟΓΩΝ ΤΜΗΜΑ ΗΛΕΚΤΡΟΛΟΓΩΝ ΜΗΧΑΝΙΚΩΝ Τ.Ε ΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ ΑΥΤΟΜΑΤΟΠΟΙΗΣΗ ΜΟΝΑΔΑΣ ΘΡΑΥΣΤΗΡΑ ΜΕ ΧΡΗΣΗ P.L.C. AUTOMATION OF A

Διαβάστε περισσότερα

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

Main source: Discrete-time systems and computer control by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1 Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1 A Brief History of Sampling Research 1915 - Edmund Taylor Whittaker (1873-1956) devised a

Διαβάστε περισσότερα

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with Week 03: C lassification of S econd- Order L inear Equations In last week s lectures we have illustrated how to obtain the general solutions of first order PDEs using the method of characteristics. We

Διαβάστε περισσότερα

Ανάπτυξη Μεγάλων Εφαρµογών στη Γλώσσα C (2)

Ανάπτυξη Μεγάλων Εφαρµογών στη Γλώσσα C (2) Ανάπτυξη Μεγάλων Εφαρµογών στη Γλώσσα C (2) Στην ενότητα αυτή θα µελετηθούν τα εξής επιµέρους θέµατα: Οργάνωση Προγράµµατος Header Files Μετάφραση και σύνδεση αρχείων προγράµµατος ΕΠΛ 132 Αρχές Προγραµµατισµού

Διαβάστε περισσότερα

Capacitors - Capacitance, Charge and Potential Difference

Capacitors - Capacitance, Charge and Potential Difference Capacitors - Capacitance, Charge and Potential Difference Capacitors store electric charge. This ability to store electric charge is known as capacitance. A simple capacitor consists of 2 parallel metal

Διαβάστε περισσότερα

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3 Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3 1 State vector space and the dual space Space of wavefunctions The space of wavefunctions is the set of all

Διαβάστε περισσότερα

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο JDBC JDBC is a set of classes and interfaces written in Java that allows Java programs to send SQL statements to a database like Oracle JDBC

Διαβάστε περισσότερα

From the finite to the transfinite: Λµ-terms and streams

From the finite to the transfinite: Λµ-terms and streams From the finite to the transfinite: Λµ-terms and streams WIR 2014 Fanny He f.he@bath.ac.uk Alexis Saurin alexis.saurin@pps.univ-paris-diderot.fr 12 July 2014 The Λµ-calculus Syntax of Λµ t ::= x λx.t (t)u

Διαβάστε περισσότερα

Partial Trace and Partial Transpose

Partial Trace and Partial Transpose Partial Trace and Partial Transpose by José Luis Gómez-Muñoz http://homepage.cem.itesm.mx/lgomez/quantum/ jose.luis.gomez@itesm.mx This document is based on suggestions by Anirban Das Introduction This

Διαβάστε περισσότερα

Διδάσκων: Κωνσταντίνος Κώστα Διαφάνειες: Δημήτρης Ζεϊναλιπούρ

Διδάσκων: Κωνσταντίνος Κώστα Διαφάνειες: Δημήτρης Ζεϊναλιπούρ Διάλεξη 10: Λίστες Υλοποίηση & Εφαρμογές Στην ενότητα αυτή θα μελετηθούν τα εξής επιμέρους θέματα: Ευθύγραμμες Απλά Συνδεδεμένες Λίστες (εύρεση, εισαγωγή, διαγραφή) Σύγκριση Συνδεδεμένων Λιστών με Πίνακες

Διαβάστε περισσότερα

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation Overview Transition Semantics Configurations and the transition relation Executions and computation Inference rules for small-step structural operational semantics for the simple imperative language Transition

Διαβάστε περισσότερα

Προσωπική Aνάπτυξη. Ενότητα 2: Διαπραγμάτευση. Juan Carlos Martínez Director of Projects Development Department

Προσωπική Aνάπτυξη. Ενότητα 2: Διαπραγμάτευση. Juan Carlos Martínez Director of Projects Development Department Προσωπική Aνάπτυξη Ενότητα 2: Διαπραγμάτευση Juan Carlos Martínez Director of Projects Development Department Unit Scope Σε αυτή την ενότητα θα μελετήσουμε τα βασικά των καταστάσεων διαπραγμάτευσης winwin,

Διαβάστε περισσότερα

ίκτυο προστασίας για τα Ελληνικά αγροτικά και οικόσιτα ζώα on.net e-foundatio //www.save itute: http:/ toring Insti SAVE-Monit

ίκτυο προστασίας για τα Ελληνικά αγροτικά και οικόσιτα ζώα on.net e-foundatio //www.save itute: http:/ toring Insti SAVE-Monit How to run a Herdbook: Basics and Basics According to the pedigree scheme, you need to write down the ancestors of your animals. Breeders should be able easily to write down the necessary data It is better

Διαβάστε περισσότερα

Φροντιςτήριο. Linked-List

Φροντιςτήριο. Linked-List Φροντιςτήριο Linked-List 1 Linked List Μια linked list είναι μια ακολουθία από ςυνδεδεμένουσ κόμβουσ Κάθε κόμβοσ περιέχει τουλάχιςτον Μια πληροφορία (ή ένα struct) Δείκτη ςτον επόμενο κόμβο τησ λίςτασ

Διαβάστε περισσότερα

Χαρακτηριστικά ενοτήτων

Χαρακτηριστικά ενοτήτων Χαρακτηριστικά ενοτήτων 1 Στόχοι Πώς να δημιουργήσεις ενότητες υψηλής ποιότητας στην C. Γιατί χρειάζεται; Η αφαίρεση είναι απαραίτητη τεχνική για την ανάπτυξη και κατανόηση μεγάλων, πολύπλοκλων συστημάτων

Διαβάστε περισσότερα