Boolean satisfiability with transitivity constraints
- 格式:pdf
- 大小:186.14 KB
- 文档页数:23
mybatis boolean 字段getter 风格MyBatis Boolean字段Getter风格在使用MyBatis进行数据库操作时,经常会遇到Boolean类型的字段。
Boolean字段表示一个逻辑值,可以是True或False。
在MyBatis中,我们有几种不同的方式来处理Boolean字段,其中之一是使用Getter方法来获取字段的值。
在本文中,我们将介绍关于使用MyBatis Boolean字段Getter风格的一些常见问题和最佳实践。
第一步:了解Boolean字段在开始之前,让我们先了解一下Boolean字段在Java中的表示。
在Java 中,Boolean类型的字段可以是原始类型(boolean)或对象类型(Boolean)。
原始类型的布尔字段定义如下:javaprivate boolean active;对象类型的布尔字段定义如下:javaprivate Boolean active;对于Boolean字段,Getter方法的命名习惯是以“is”开头,后面跟上字段名,例如:javapublic boolean isActive() {return active;}或者javapublic Boolean getActive() {return active;}第二步:设置Boolean字段的值在MyBatis中,我们可以使用Getter方法来获取Boolean字段的值。
但是,Setter方法用于设置Boolean字段的值。
对于Boolean字段的Setter 方法,我们可以按照以下命名习惯来定义:javapublic void setActive(boolean active) {this.active = active;}或者javapublic void setActive(Boolean active) {this.active = active;}第三步:配置MyBatis映射文件在使用MyBatis进行数据库操作时,我们需要定义映射文件(xml)来配置数据库表和Java对象之间的映射关系。
booleanquery 的原理
Boolean query是一种用于搜索和过滤数据的技术,它允许用户使用逻辑运算符(如AND、OR、NOT)组合多个查询条件来查找满足特定条件的数据。
例如,假设有一个包含员工信息的数据库,你可以使用Boolean query来查找特定部门(如销售部门)的特定年龄段(如30-40岁)的男性员工。
在这个例子中,你可以使用以下的Boolean query:
```
WHERE department = '销售' AND gender = '男' AND age BETWEEN 30 AND 40
```
这个Boolean query使用了逻辑运算符AND来组合三个查询条件:部门、性别和年龄。
只有当所有条件都满足时,才会返回相应的员工记录。
Boolean query的原理基于布尔代数,其中每个条件都可以被视为一个布尔变量(True 或False),而逻辑运算符则用于组合这些布尔变量以形成更复杂的条件。
在执行Boolean query时,数据库系统会评估每个条件,并将其结果组合使用逻辑运算符,以确定哪些记录满足查询条件。
Boolean query可以非常灵活地组合多个条件,以满足不同的搜索需求。
它在许多数据库系统和搜索引擎中都得到了广泛的应用。
布尔函数表示法对SAT问题求解算法的影响分析SAT(Boolean satisfiability problem)问题是计算机科学中一个经典且重要的问题,在许多领域都有广泛的应用。
SAT问题的目标是找到一个布尔赋值,使得给定的布尔函数的值为真。
为了解决这一问题,人们采用了不同的布尔函数表示法,并研究其对SAT问题求解算法的影响。
一、布尔函数表示法的定义和分类布尔函数表示法是指用一组逻辑运算符将布尔函数的逻辑关系表示出来的方法。
常见的布尔函数表示法包括合取范式(CNF)和析取范式(DNF)等。
1. 合取范式(CNF)合取范式是将布尔函数表示为若干个子句的合取,每个子句由一组文字的析取组成。
具体表示为:F = (C1 ∧ C2 ∧ ... ∧ Cn)其中,每个子句Ci由一个或多个文字的析取组成。
2. 析取范式(DNF)析取范式是将布尔函数表示为若干个子句的析取,每个子句由一组文字的合取组成。
具体表示为:F = (C1 ∨ C2 ∨ ... ∨ Cn)其中,每个子句Ci由一个或多个文字的合取组成。
二、CNF和DNF在SAT问题求解算法中的应用CNF和DNF是两种常见的布尔函数表示法,在SAT问题求解算法中起到了重要的作用。
下面将分别介绍它们对SAT问题求解算法的影响。
1. CNF对SAT问题求解算法的影响CNF表示法在SAT问题求解算法中的应用最为广泛。
CNF Formula是CNF表示法下的布尔函数,通常采用变量和逻辑运算符组成的析取式。
CNF表示法的主要优势是能够通过简单的逻辑运算实现布尔函数之间的合取和析取操作,对计算机进行编码时更加方便。
在SAT问题求解算法中,将布尔函数转化为CNF Formula后,可以应用算法对其进行求解。
例如,DPLL算法和CDCL算法等常用的SAT求解算法都是基于CNF表示法实现的。
2. DNF对SAT问题求解算法的影响与CNF相反,DNF表示法在SAT问题求解算法中的应用相对较少。
Siebel学习笔记Siebel(escript)的学习:1.Siebel的数据类型Primitive(原始的)---Number,Integer,Hexadecimal(⼗六进制),Octal(⼋进制),Floating Point(浮点),Decimal(⼗进制),Scientific(系统的),Boolean, StringComposite(复合的)---Object,Array,Special(特殊的)----Undefined(未定义的), Null,NaN(⾮数值)2. typeof ⽅法typeof variable or typeof(variable)返回值为:"undefined","boolean","string","object","number","function",or"buffer"3. Refresh Record Methods刷新Applet的记录var oBs=TheApplication().GetService("FINS Teller UI Navigation").oBs.InvokeMethod("RefreshCurrentApplet",Inputs,Outputs);/*如果input的参数中有设置Refresh All为Y,则刷新当前View所在的所有Applet*/BC有两个Method:BusComp.invokeMethod("RefreshRecord") 刷新当前记录BusComp.invokeMehtod("RefreshBusComp") 刷新当前查询记录4.TheApplication().Trace MethodTheApplication().TraceOn(filename,type,selection)Filename 为⽇志⽂件,绝对路径Type 包括Allocation和SQL1.Allocation.Traces allocations and deallocations of Siebel objects. This option is useful if you suspect memory leaks in your code.2.SQL.Traces SQL statements generated by the Siebel application.Selection ⼀般我们都⽤All就可以了eg: TheApplication().TraceOn("D:\\siebel_debug\\trace.txt","Allocation","All");5.配置MVL注意点配置MVL时需要将use primary join 打勾,不然会导致⽣成N+1条SQL语句的问题.e primary join的作⽤:use primary join没有打勾,会把每条关联数据都查询出来.use primary join 有打勾,只会把主关联数据查询出来.6.About Get BO\BCAbout Get BO1.TheApplication().ActiveBusObject();returns the business object for the business component of the active applet2.this.BusObject();returns the business object for the business component of the applet.3.TheApplication().GetBusObject("BO NAME");instantiates and returns a new instance of the argument specified business object---------------------------------------------------------------------------------------------About Get BC1.TheApplication().ActiveBusComp();returns the business component associated with the active applet.2.this.BusComp();returns the business component of the applet.Eg: this.BusComp().GetFieldValue(“Id”); //use it to get current record id3.boXXX.GetBusComp("BC NAME");instantiates and returns a new instance of the argument specified business component7.BC Operationwith(oBcName){ClearToQuery();SetViewMode(AllView);//ViewMode,⼀般常⽤的为 Organization Catelog 等ActivateField("Status");SetSearchSpec("Id", sOrdId);// or SetSearchExpr(sSearch);//特别注意 SetSearchSpec 和 SetSearchExpr 交替使⽤是会覆盖查询条件的情况,⾃⼰测试ExecuteQuery(ForwardOnly);}//DeleteRecord 不需要 NextRecord8.在 escript 中使⽤ PickList在脚本中对具有 PickList 的 Field 赋值时,不要直接使⽤ SetFieldValue 对 field 直接赋值,需要使⽤ Pick ⽅法错误的赋值⽅式:BC.SetFieldValue("fieldname", "value"),正确的赋值⽅式:with(oBcCA){var oBCPick = GetPicklistBusComp("State");with (oBCPick){ClearToQuery();SetSearchSpec("Value", "CA");ExecuteQuery(ForwardOnly);I f(FirstRecord())Pick();}//end with(oBCPick)oBCPick = null;}//end with(oBcCA)9.eScript 中 Split ⽅法的使⽤循环使⽤ Split ⽅法会引起内存泄漏,在使⽤⼀次后,请及时 destory 对象。
windowsBLE编程netwinform连接蓝⽛4.0winform 程序调⽤Windows.Devices.Bluetoot API 实现windows下BLE蓝⽛设备⾃动连接,收发数据功能。
不需要使⽤win10的UWP开发。
先贴图,回头来完善代码源码如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Windows.Devices.Bluetooth;using Windows.Devices.Bluetooth.GenericAttributeProfile;using Windows.Devices.Enumeration;using Windows.Foundation;using Windows.Security.Cryptography;namespace BLECode{public class BluetoothLECode{//存储检测的设备MAC。
public string CurrentDeviceMAC { get; set; }//存储检测到的设备。
public BluetoothLEDevice CurrentDevice { get; set; }//存储检测到的主服务。
public GattDeviceService CurrentService { get; set; }//存储检测到的写特征对象。
public GattCharacteristic CurrentWriteCharacteristic { get; set; }//存储检测到的通知特征对象。
public GattCharacteristic CurrentNotifyCharacteristic { get; set; }public string ServiceGuid { get; set; }public string WriteCharacteristicGuid { get; set; }public string NotifyCharacteristicGuid { get; set; }private const int CHARACTERISTIC_INDEX = 0;//特性通知类型通知启⽤private const GattClientCharacteristicConfigurationDescriptorValue CHARACTERISTIC_NOTIFICATION_TYPE = GattClientCharacteristicConfigurationDescriptorValue.Notify;private Boolean asyncLock = false;private DeviceWatcher deviceWatcher;//定义⼀个委托public delegate void eventRun(MsgType type, string str,byte[] data=null);//定义⼀个事件public event eventRun ValueChanged;public BluetoothLECode(string serviceGuid, string writeCharacteristicGuid, string notifyCharacteristicGuid){ServiceGuid = serviceGuid;WriteCharacteristicGuid = writeCharacteristicGuid;NotifyCharacteristicGuid = notifyCharacteristicGuid;}public void StartBleDeviceWatcher(){string[] requestedProperties = { "System.Devices.Aep.DeviceAddress", "System.Devices.Aep.IsConnected", "System.Devices.Aep.Bluetooth.Le.IsConnectable" };string aqsAllBluetoothLEDevices = "(System.Devices.Aep.ProtocolId:=\"{bb7bb05e-5972-42b5-94fc-76eaa7084d49}\")";deviceWatcher =DeviceInformation.CreateWatcher(aqsAllBluetoothLEDevices,requestedProperties,DeviceInformationKind.AssociationEndpoint);// Register event handlers before starting the watcher.deviceWatcher.Added += DeviceWatcher_Added;deviceWatcher.Stopped += DeviceWatcher_Stopped;deviceWatcher.Start();ValueChanged(MsgType.NotifyTxt, msg);}private void DeviceWatcher_Stopped(DeviceWatcher sender, object args){string msg = "⾃动发现设备停⽌";ValueChanged(MsgType.NotifyTxt, msg);}private void DeviceWatcher_Added(DeviceWatcher sender, DeviceInformation args){ValueChanged(MsgType.NotifyTxt, "发现设备:" + args.Id);if (args.Id.EndsWith(CurrentDeviceMAC)){Matching(args.Id);}}///<summary>///按MAC地址查找系统中配对设备///</summary>///<param name="MAC"></param>public async Task SelectDevice(string MAC){CurrentDeviceMAC = MAC;CurrentDevice = null;DeviceInformation.FindAllAsync(BluetoothLEDevice.GetDeviceSelector()).Completed = async (asyncInfo, asyncStatus) => {if (asyncStatus == pleted){DeviceInformationCollection deviceInformation = asyncInfo.GetResults();foreach (DeviceInformation di in deviceInformation){await Matching(di.Id);}if (CurrentDevice == null){string msg = "没有发现设备";ValueChanged(MsgType.NotifyTxt, msg);StartBleDeviceWatcher();}}};}///<summary>///按MAC地址直接组装设备ID查找设备///</summary>///<param name="MAC"></param>///<returns></returns>public async Task SelectDeviceFromIdAsync(string MAC){CurrentDeviceMAC = MAC;CurrentDevice = null;BluetoothAdapter.GetDefaultAsync().Completed = async (asyncInfo, asyncStatus) =>{if (asyncStatus == pleted){BluetoothAdapter mBluetoothAdapter = asyncInfo.GetResults();byte[] _Bytes1 = BitConverter.GetBytes(mBluetoothAdapter.BluetoothAddress);//ulong转换为byte数组Array.Reverse(_Bytes1);string macAddress = BitConverter.ToString(_Bytes1, 2, 6).Replace('-', ':').ToLower();string Id = "BluetoothLE#BluetoothLE" + macAddress + "-" + MAC;await Matching(Id);}};}private async Task Matching(string Id){try{BluetoothLEDevice.FromIdAsync(Id).Completed = async (asyncInfo, asyncStatus) =>{if (asyncStatus == pleted){BluetoothLEDevice bleDevice = asyncInfo.GetResults();//在当前设备变量中保存检测到的设备。
布尔可满足性问题的启发式求解算法引言布尔可满足性问题(Boolean Satisfiability Problem,简称SAT)是计算机科学中一个经典的问题。
给定一个布尔表达式,判断是否存在一组变量的赋值,使得该表达式为真。
SAT问题是一个NP完全问题,通常在实际应用中遇到大规模的情况下,求解时间较长。
为了加快求解速度,并找到最优解,研究人员发展了各种启发式求解算法。
本文将介绍一些常用的启发式求解算法。
1. 真值传播算法真值传播算法是一种广泛应用于SAT问题求解的启发式算法。
该算法利用逻辑公式的传播规则,对变量的真值进行推理,以便找到更多的可满足解。
算法的核心思想是根据已有的真值分配,推断出其他变量可能的取值,为下一步的决策提供参考。
2. 单子句传播算法单子句传播算法是真值传播算法的一种变体。
它通过从公式中抽取出单子句,将其直接赋值为真,从而简化了问题的形式,并约束了其他变量的取值范围。
这一过程可以减少搜索空间,加速求解过程。
3. 学习策略学习策略在SAT问题中起到了关键作用。
当求解算法在搜索过程中遇到冲突时,学习策略能够根据已有信息获得新的限制条件,提高求解效率。
一种常用的学习策略是学习子句的单位分辨,即从冲突子句中选择一个文字,反转它的取值,得到一个新子句,并添加到公式中。
这样可以避免再次遇到类似的冲突。
4. 启发式变量选择选择合适的变量进行赋值是求解SAT问题时的一个重要决策。
启发式变量选择策略可以根据一些指标,如出现频率、相互影响等,选取具有较高影响力的变量。
这样可以更快地找到满足条件的解。
5. 分支策略分支策略是SAT求解算法中的一项关键技术。
它根据已有的真值分配,选择一个变量进行赋值。
一般来说,该变量应该是具有较大的决策影响的变量。
分支策略的选择对求解效率有重要影响,需要根据问题的性质进行灵活调整。
结论布尔可满足性问题是一个经典而重要的问题,在许多实际应用中都有广泛的应用。
为了提高求解效率,研究人员提出了各种启发式求解算法。
数据结构-最⼤堆、最⼩堆【⼿动实现】0,堆的简介 数据结构中的堆是⼀种特殊的⼆叉树,不同于 Java 内存模型中的堆。
堆必须符合以下两个条件:1. 是⼀棵完全⼆叉树。
2. 任意⼀个节点的值都⼤于(或⼩于)左右⼦节点的值。
从第⼀点可以知道,堆适合⽤数组来存储。
第⼆点中,若⽗节点都⼤于等于左右⼦节点,则被称为⼤顶堆,反之则为⼩顶堆。
图-最⼤堆及其存储⽅式 0.1节点的⽗、⼦节点关系 ⼀个节点【根节点除外】的⽗节点地址为其地址的⼆分之⼀,它的左⼦节点地址为其地址值的2倍,右⼦节点地址为其地址2倍加1。
例如:现在有个节点的地址为3,其数值为5;那么它的⽗节点地址为3/2=1,⽗节点的数值为13;左⼦节点地址为3*2=6,左⼦节点数值为6;右⼦节点地址为3*2+1=7,这个最⼤堆中没有其右节点数据。
0.2节点的存储、删除操作 添加新元素的时候,⼀般先存放到数组的尾部,之后在通过向上重排序的操作,来进⾏堆化【满⾜堆数据结构的调整】 删除元素时【⼀般默认删除第⼀个根节点】,现将数组的最后⼀个元素放到根节点的位置,之后通过向下重排序的操作,来进⾏堆化处理。
1,堆的实现 主要实现功能:①添加元素-add();②输出极值并清除-poll();③输出极值不清除-peek(); 上⾯的功能都是是显⽰的函数,隐形函数有:①扩容dilatate();②向上重排序reSortUp();③向下重排序reSortDown();package blogs.mufasa.Solution1;public class Heap {private static final int CAPACITY=16;private static final boolean TYPE=true;private static int[] nums;private int capacity=16;int size=0;private boolean type=true;//true由⼩到⼤,false由⼤到⼩public Heap(){this(CAPACITY);}public Heap(int capacity){this(capacity,TYPE);}public Heap(boolean type){this(CAPACITY,type);}public Heap(int capacity,boolean type){this.capacity=capacity;this.type=type;nums=new int[capacity];}//数据添加public void add(int num){if(size+1>=capacity){dilatate();}nums[size+1]=num;reSortUp(size+1);size++;}private void reSortUp(int index){if(type){//由⼩到⼤while (index!=1){if(nums[index/2]>nums[index]){int temp=nums[index];nums[index]=nums[index/2];nums[index/2]=temp;index/=2;}else if(nums[index/2]==nums[index]){// throw new IllegalArgumentException("数据结构-堆不接受重复数据输⼊");break;}else {return;}}}else {//由⼤到⼩while (index!=1){if(nums[index/2]<nums[index]){int temp=nums[index];nums[index]=nums[index/2];nums[index/2]=temp;index/=2;}else if(nums[index/2]==nums[index]){// throw new IllegalArgumentException("数据结构-堆不接受重复数据输⼊");break;}else {return;}}}}//数据输出,并且清楚该数据public int poll() throws Exception {if(size>0){int temp=nums[1];nums[1]=nums[size];reSortDown();size--;return temp;}else {throw new Exception("数据为空");}}private void reSortDown(){int index=1;int L,R;if(type){//由⼩到⼤while (index<size){L=index*2;R=L+1;if(R<=size){boolean flag=nums[L]<nums[R];int min=(flag?nums[L]:nums[R]);if(nums[index]>min){if(flag){int temp=nums[index];nums[index]=nums[L];nums[L]=temp;index=L;}else {int temp=nums[index];nums[index]=nums[R];nums[R]=temp;index=R;}}else {return;}}else if(L<=size){if(nums[index]>nums[L]){int temp=nums[index];nums[index]=nums[L];nums[L]=temp;}return;}else {return;}}}else {//由⼤到⼩while (index<size){L=index*2;R=L+1;if(R<size){boolean flag=nums[L]<nums[R];int max=(flag?nums[R]:nums[L]);if(nums[index]<max){if(flag){int temp=nums[index];nums[index]=nums[R];nums[R]=temp;index=R;}else {int temp=nums[index];nums[index]=nums[L];nums[L]=temp;index=L;}}else {return;}}else if(L<size){if(nums[index]<nums[L]){int temp=nums[index];nums[index]=nums[L];nums[L]=temp;}return;}else {return;}}}}//数据输出,不清除该数据public int peek() throws Exception {if(size>0){return nums[0];}else {throw new Exception("数据为空");}}//数据扩容,⼆倍扩容private void dilatate(){capacity=capacity<<1;int[] pre=new int[capacity];for(int i=1;i<=size;i++){pre[i]=nums[i];}nums=pre;}}class Client{public static void main(String[] args) throws Exception { Heap heap=new Heap(4,true);// Heap heap=new Heap(4,false);heap.add(5);heap.add(3);heap.add(3);heap.add(7);heap.add(1);heap.add(0);heap.add(8);heap.add(8);int len=heap.size;for(int i=0;i<len;i++){System.out.print(heap.poll()+",");}}}/*0,1,3,5,7,8,8,7,5,3,1,0,*/2,堆的应⽤ 3.1 堆排序 利⽤堆这种数据结构,来进⾏数组排序,时间复杂度为O(nlogn) 3.2 Java容器中的优先队列 PriorityQueue<Integer> queue=new PriorityQueue<Integer>(); 3.3 求动态集合中位数 有若⼲个数据,求其中位数,并且数据还在不断的输⼊【两个堆数据即可很好的解决问题,⼀个最⼤堆,⼀个最⼩堆】 3.4 60百分位的数 这个问题是上⾯的问题的扩展,本质上也是使⽤两个对数据结构即可。
[信息检索]第⼀讲布尔检索BooleanRetrieval第⼀讲布尔检索Boolean Retrieval主要内容:1. 信息检索概述2. 倒排记录表3. 布尔查询处理⼀、信息检索概述什么是信息检索?Information Retrieval (IR) is finding material (usually documents) of an unstructured nature (usually text) that satisfies an information need from within large collections (usually stored on computers).信息检索是从⼤规模⾮结构化数据(通常是⽂本)的集合(通常保存在计算机上)中找出满⾜⽤户信息需求的资料(通常是⽂档)的过程。
Document –⽂档Unstructured – ⾮结构化Information need –信息需求Collection—⽂档集、语料库⼆、倒排记录表1、什么是布尔查询?布尔查询是指利⽤ AND, OR 或者 NOT操作符将词项连接起来的查询如:信息 AND 检索2、⼀个信息检索的例⼦(莎⼠⽐亚全集)不到100万单词,假设每个英⽂单词平均长度为8字节,则整个全集不到10MB查询需求:莎⼠⽐亚的哪部剧本包含Brutus及Caesar但是不包含Calpurnia?查询的布尔表⽰:Brutus AND Caesar AND NOT Calpurnia解决⽅案:⽅法⼀:暴⼒⽅法从头到尾扫描所有剧本,对每部剧本判断它是否包含Brutus AND Caesar ,同时⼜不包含Calpurnia不⾜之处:速度超慢 (特别是⼤型⽂档集)处理NOT Calpurnia 并不容易(不到末尾不能停⽌判断)不太容易⽀持其他操作 (e.g., 寻找靠近countrymen的单词Romans)不⽀持检索结果的(灵活)排序 (排序时只返回较好的结果)优点:实现简单很容易⽀持⽂档动态变化⽅法⼆:倒排记录表词项-⽂档(term-doc)关联矩阵若某剧本包含某单词,则该位置为1,否则为0.关联矩阵的每⼀列(对应⼀篇⽂档)都是 0/1向量,每个0/1都对应⼀个词项关联矩阵的每⼀⾏(对应⼀个词项)也可以看成⼀个0/1向量,每个0/1代表该词项在相应⽂档中的出现与否给定查询Brutus AND Caesar AND NOT Calpurnia取出三个词项对应的⾏向量,并对Calpurnia 的⾏向量求反,最后按位进⾏与操作110100 AND 110111 AND 101111 = 100100.问题:当出现更⼤的⽂档集假定N = 1 百万篇⽂档(1M), 每篇有1000个词(1K)假定每个词平均有6个字节(包括空格和标点符号),那么所有⽂档将约占6GB 空间.假定词汇表的⼤⼩(即词项个数) M = 500K此时,词项-⽂档矩阵将⾮常⼤矩阵⼤⼩为 500K x 1M=500G但是该矩阵中最多有10亿(1G)个1:词项-⽂档矩阵⾼度稀疏(sparse)更好的办法:仅仅记录1的位置,即倒排索引对每个词项t, 记录所有包含t的⽂档列表.每篇⽂档⽤⼀个唯⼀的 docID来表⽰,通常是正整数,如1,2,3…磁盘上,顺序存储⽅式⽐较好,便于快速读取内存中,采⽤链表或者可变长数组⽅式倒排记录表按docID排序索引构建过程:1、词条序列:<词条,docID>⼆元组2、排序按词项排序,然后每个词项按docID排序1. 词典&倒排记录表某个词项在单篇⽂档中的多次出现会被合并拆分成词典和倒排记录表两部分每个词项出现的⽂档数⽬(doc frequency, DF)会被加⼊3、布尔查询的处理假定索引已经构建好了,如何利⽤索引来处理查询?AND查询的处理:考虑如下查询(从简单的布尔表达式⼊⼿):Brutus AND Caesar在词典中定位 Brutus返回对应倒排记录表(对应的docID)在词典中定位Caesar再返回对应倒排记录表合并(Merge)两个倒排记录表,即求交集合并过程:每个倒排记录表都有⼀个定位指针,两个指针同时从前往后扫描, 每次⽐较当前指针对应倒排记录,然后移动某个或两个指针。
分享两篇SCI发表的经历三年前对于我来说SCI就是天书一样,在我踏进博士的门槛后我以为自己进入了地狱,也纠结也彷徨,整天刷虫友们对于博士、SCI的帖子,我选择了虫友们鼓励的那一部分来激励自己继续前行。
我告诉自己坚持就是胜利,当然那是积极的坚持。
在好几月之前就有这个想法,今天早上收到第二篇的接收通知后,我便想今天一定要在小木虫上谢谢那些给予我帮助的虫友们。
话不多说,我把自己这两篇投稿的经历与大家共享,希望能给大家带来一点点用处。
第一篇发表在FitoterapiaCover letterDear Editor Verotta:We would like to submit the manuscript entitled "××××××题目" by ××××××所有作者姓名which we wish to be considered for publication in Journal of Fitoterapia.All authors have read and approved this version of the article, and due care has been taken to ensure the integrity of the work. Neither the entire paper nor any part of its content has been published or has been accepted elsewhere. It is not being submitted to any other journal.We believe the paper may be of particular interest to the readers of your journal as it is the first time of ××××××研究的精华所在Thank you very much for your reconsidering our revised manuscript for potential publication in Fitoterapia. We are looking forward to hearing from you soon. Correspondence should be addressed to Jinhui Yu at the following address, phone and fax number, and email address.地址、学院、学校名称Phone: + 86××××××Fax number: + 86571××××××Best wishes for you and your family!Sincerely yours,×××所有作者Response to reviewersDear Editor:Thank you very much for your letter and the comments from the referees about our paper submitted to Journal of Fitoterapia (FITOTE-D-11-01071). The manuscript entitled "××××××" by ××××××所有作者have been revised according to the reviewers’ comments, and we wish it to be reconsidered for publication in Journal of Fitoterapia.A list of changes and responses to reviewers are as follows.List of ActionsLOA1: The key words were changed in page?.LOA2: The name and location of the local biochemistry company have been added in section 2.1 (page 3).LOA3: A paragraph has been added in section 3.1 (page 5) to further explain the determination of the cis and trans configuration of double bonds in polyprenols.LOA4: The language was improved by English language editing of Elsevier webshop.To Reviewer 1#,Thank you very much for pointing out the problems in our manuscript. We have revised it according to your recommendations. We would like to know if there are still somewhere need to be amended.(1) Keywords: general terms should be avoided; I would change some of the keywords (homologues, identification, quantification)The key words have been changed as follows: ××××××修改后关键词(2) In paragraph 2.1 the "local biochemistry company" should be identified byname and location.The name and location of the local biochemistry company have been added in section 2.1 (page 3). NaOH,Pyrogallol,anhydrous Na2SO4 were purchased from Hangzhou ChangqingHuagong CO., LTD.(3) How the cis and trans configuration of double bonds in ××××××were determined? Authors should say something about.The following paragraph has been added in section 3.1 (page 5) to further explain the determination of the cis and trans configuration of double bonds in ××××××.(4) Language should be checked for clarity and correctness.The language was improved by English language editing of Elsevier webshop.To Reviewer 2#,Thank you very much for your recommendation on our paper and we have improved by English language editing of Elsevier webshop.All in all, thank you very much for your reconsidering our revised manuscript for potential publication in Fitoterapia. I'm looking forward to hearing from you soon. Correspondence should be addressed to ****第一作者或通讯作者at the following address, phone and fax number, and email address.地址Phone: + 86571××××××Fax number: + ××××××Best wishes for you and your family!Sincerely yours,××××××所有作者总的来说,第一篇文章没有费很大劲。
Boolean Satisfiabilitywith Transitivity ConstraintsRandal E.BryantMiroslav N.V elevCarnegie Mellon UniversityJune,2000CMU-CS-00-101School of Computer ScienceCarnegie Mellon UniversityPittsburgh,PA15213Supported,in part,by the Semiconductor Research Corporation under contract00-DC-684Keywords:Formal verification,Boolean satisfiability,Decision proceduresAbstractWe consider a variant of the Boolean satisfiability problem where a subset of the propositional variables appearing in formula sat encode a symmetric,transitive,binary relation over ele-ments.Each of these relational variables,,for,expresses whether or not the relation holds between elements and.The task is to eitherfind a satisfying assignment to sat that also satisfies all transitivity constraints over the relational variables(e.g.,), or to prove that no such assignment exists.Solving this satisfiability problem is thefinal and most difficult step in our decision procedure for a logic of equality with uninterpreted functions.This procedure forms the core of our tool for verifying pipelined microprocessors.To use a conventional Boolean satisfiability checker,we augment the set of clauses expressing sat with clauses expressing the transitivity constraints.We consider methods to reduce the number of such clauses based on the sparse structure of the relational variables.To use Ordered Binary Decision Diagrams(OBDDs),we show that for some sets,the OBDD representation of the transitivity constraints has exponential size for all possible variable orderings. By considering only those relational variables that occur in the OBDD representation of sat,our experiments show that we can readily construct an OBDD representation of the relevant transitivity constraints and thus solve the constrained satisfiability problem.1IntroductionConsider the following variant of the Boolean satisfiability problem.We are given a Booleanformula sat over a set of variables.A subset symbolically encodes a binary relationover elements that is reflexive,symmetric,and transitive.Each of these relational variables,,where,expresses whether or not the relation holds between elements and .Typically,will be“sparse,”containing much fewer than the possible variables. Note that when for some value of and of,this does not imply that the relation does not hold between elements and.It simply indicates that sat does not directly depend on therelation between elements and.A transitivity constraint is a formula of the form(1) where equals when and equals when.Let denote the set of all transitivity constraints that can be formed from the relational variables.Our task is tofind an assignment that satisfies sat,as well as every constraint in.Goel, et al.[GSZAS98]have shown this problem is NP-hard,even when sat is given as an Ordered Binary Decision Diagram(OBDD)[Bry86].Normally,Boolean satisfiability is trivial given an OBDD representation of a formula.We are motivated to solve this problem as part of a tool for verifying pipelined microprocessors[VB99].Our tool abstracts the operation of the datapath as a set of uninterpreted functions and uninterpreted predicates operating on symbolic data.We prove that a pipelined processor has behavior matching that of an unpipelined reference model using the symbolicflushing technique developed by Burch and Dill[BD94].The major computational task is to decide the validity of a formula ver in a logic of equality with uninterpreted functions[BGV99a,BGV99b].Our decision procedure transforms verfirst by replacing all function application terms with terms over a set of domain variables.Similarly,all predicate applications are replaced by formulas over a set of newly-generated propositional variables.The result is a formula ver containing equations of the form,where.Each of these equations is then encoded by introducing a relational variable,similar to the method proposed by Goel,et al.[GSZAS98].The result of the translation is a propositional formula ver expressing the verification condition over both the relational variables and the propositional variables appearing in ver.Let sat denote ver,the complement of the formula expressing the translated verification condition.To capture the transitivity of equality,e.g.,that, we have transitivity constraints of the form.Finding a satisfying assignment to sat that also satisfies the transitivity constraints will give us a counterexample to the original verification condition ver.On the other hand,if we can prove that there are no such assignments, then we have proved that ver is universally valid.We consider three methods to generate a Boolean formula trans that encodes the transitivityconstraints.The direct method enumerates the set of chord-free cycles in the undirected graph having an edge for each relational variable.This method avoids introducing addi-tional relational variables but can lead to a formula of exponential size.The dense method usesrelational variables for all possible values of and such that.We can thenaxiomatize transitivity by forming constraints of the form for all distinct values of,,and.This will yield a formula that is cubic in.The sparse method augments with additional relational variables to form a set of variables,such that the resulting graph is chordal [Rose70].We then only require transitivity constraints of the form such that .The sparse method is guaranteed to generate a smaller formula than thedense method.To use a conventional Boolean Satisfiability(SA T)procedure to solve our constrained satisfia-bility problem,we run the checker over a set of clauses encoding both sat and trans.The latestversion of the FGRASP SA T checker[M99]was able to complete all of our benchmarks,although the run times increase significantly when transitivity constraints are enforced.When using Ordered Binary Decision Diagrams to evaluate satisfiability,we could generateOBDD representations of sat and trans and use the APPLY algorithm to compute an OBDD representation of their conjunction.From this OBDD,finding satisfying solutions would be trivial. We show that this approach will not be feasible in general,because the OBDD representation of trans can be intractable.That is,for some sets of relational variables,the OBDD representation of the transitivity constraint formula trans will be of exponential size regardless of the variableordering.The NP-completeness result of Goel,et al.shows that the OBDD representation of trans may be of exponential size using the ordering previously selected for representing sat as an OBDD.This leaves open the possibility that there could be some other variable ordering that would yield efficient OBDD representations of both sat and trans.Our result shows that transitivity constraints can be intrinsically intractable to represent with OBDDs,independent of the structure of sat.We present experimental results on the complexity of constructing OBDDs for the transitivity constraints that arise in actual microprocessor verification.Our results show that the OBDDs can indeed be quite large.We consider two techniques to avoid constructing the OBDD representation of all transitivity constraints.Thefirst of these,proposed by Goel,et al.[GSZAS98],generates implicants(cubes)of sat and rejects those that violate the transitivity constraints.Although this method suffices for small benchmarks,wefind that the number of implicants generated for our larger benchmarks grows unacceptably large.The second method determines which relational variables actually occur in the OBDD representation of sat.We can then apply one of our three techniques for encoding the transitivity constraints in order to generate a Boolean formula for the transitivity constraints over this reduced set of relational variables.The OBDD representation of this formula is generally tractable,even for the larger benchmarks.2BenchmarksOur benchmarks[VB99]are based on applying our verifier to a set of high-level microprocessor designs.Each is based on the DLX RISC processor described by Hennessy and Patterson[HP96]: 1DLX-C:is a single-issue,five-stage pipeline capable of fetching up to one new instruction every clock cycle.It implements six instruction types:register-register,register-immediate,Circuit Domain Propositional Equations 1DLX-C1342372558118 2DLX-CA-t2DLX-CC2570143 min.avg.max.To create more challenging benchmarks,we generated variants of the circuits that require en-forcing transitivity in the verification.For example,the normal forwarding logic in the Execute stage of1DLX-C must determine whether to forward the result from the Memory stage instruc-tion as either one or both operand(s)for the Execute stage instruction.It does this by comparing the two source registers ESrc1and ESrc2of the instruction in the Execute stage to the destination register MDest of the instruction in the memory stage.In the modified circuit,we changed the by-pass condition ESrc1MDest to be ESrc1MDest ESrc1ESrc2ESrc2MDest. Given transitivity,these two expressions are equivalent.For each pipeline,we introduced four such modifications to the forwarding logic,with different combinations of source and destination registers.These modified circuits are named1DLX-C-t,2DLX-CA-t,and2DLX-CC-t.To study the problem of counterexample generation for buggy circuits,we generated105vari-ants of2DLX-CC,each containing a small modification to the control logic.Of these,5were found to be functionally correct,e.g.,because the modification caused the processor to stall un-necessarily,yielding a total of100benchmark circuits for counterexample generation.Table1gives some statistics for the benchmarks.The number of domain variables ranges between13and25,while the number of equations ranges between27and143.The verification condition formulas ver also contain between42and77propositional variables expressing the operation of the control logic.These variables plus the relational variables comprise the set of variables in the propositional formula sat.The circuits with modifications that require en-forcing transitivity yield formulas containing up to19additional equations.Thefinal three lines summarize the complexity of the100buggy variants of2DLX-CC.We apply a number of sim-plifications during the generation of formula sat,and hence small changes in the circuit can yield significant variations in the formula complexity.3Graph FormulationOur definition of(Equation1)places no restrictions on the length or form of the tran-sitivity constraints,and hence there can be an infinite number.We show that we can construct a graph representation of the relational variables and identify a reduced set of transitivity constraints that,when satisfied,guarantees that all possible transitivity constraints are satisfied.By introduc-ing more relational variables,we can alter this graph structure,further reducing the number of transitivity constraints that must be considered.For variable set,define the undirected graph as containing a vertex for,and an edge for each variable.For an assignment of Boolean values to the relational variables,define the labeled graph to be the graph with each edge labeled as a 1-edge when,and as a0-edge when.A path is a sequence of vertices having edges between successive elements. That is,each element of the sequence()denotes a vertex:,while each successive pair of elements and()forms an edge We consider each edge for to also be part of the path.A cycle is a path of the form.Proposition1An assignment to the variables in violates transitivity if and only if some cycle in contains exactly one0-edge.Proof:If.Suppose there is such a cycle.Letting be the vertex at one end of the0-edge,we can trace around the cycle,giving a sequence of vertices,where is the vertex at the other end of the0-edge.The assignment has for,and, and hence it violates Equation1.Only If.Suppose the assignment violates a transitivity constraint given by Equation1.Then, we construct a cycle of vertices such that only edge is a0-edge.A path is said to be acyclic when for all.A cycleis said to be simple when its prefix is acyclic.Proposition2An assignment to the variables in violates transitivity if and only if some simple cycle in contains exactly one0-edge.Proof:The“if”portion of this proof is covered by Proposition1.The“only if”portion is proved by induction on the number of variables in the antecedent of the transitivity constraint (Equation1.)That is,assume a transitivity constraint containing variables in the antecedent is violated and that all other violated constraints have at least variables in their antecedents.If there are no values and such that and,then the cycle is simple. If such values and exist,then we can form a transitivity constraint:This transitivity constraint contains fewer than variables in the antecedent,but it is also violated. This contradicts our assumption that there is no violated transitivity constraint with fewer than variables in the antecedent.Define a chord of a simple cycle to be an edge that connects two vertices that are not adjacent in the cycle.More precisely,for a simple cycle,a chord is an edge in such that,with,and either or.A cycle is said to be chord-free if it is simple and has no chords.Proposition3An assignment to the variables in violates transitivity if and only if some chord-free cycle in contains exactly one0-edge.Proof:The“if”portion of this proof is covered by Proposition1.The“only if”portion is proved by induction on the number of variables in the antecedent of the transitivity constraint (Equation1.)Assume a transitivity constraint with variables is violated,and that no transitivity constraint with fewer variables in the antecedent is violated.If there are no values of and such that there is a variable with and either or,then the corresponding cycle is chord-free.If such values of and exist,then consider the two cases illustrated in Figure 1,where0-edges are shown as dashed lines,1-edges are shown as solid lines,and the wavy lines0-Edge1-EdgeFigure1:Case Analysis for Proposition3.0-Edges are shown as dashed lines.When a cycle rep-resenting a transitivity violation contains a chord,we canfind a smaller cycle that also represents a transitivity violation.represent sequences of1-edges.Case1:Edge is a0-edge(shown on the left).Then the transitivity constraint:is violated and has fewer than variables in its antecedent.Case2:Edge is a1-edge(shown on the right).Then the transitivity constraint:is violated and has fewer than variables.Both cases contradict our assumption that there is no violated transitivity constraint with fewer than variables in the antecedent.Each length cycle yields constraints,given by the following clauses.Each clause is derived by expressing Equation1as a disjunction.(2)For a set of relational variables,we define trans to be the conjunction of all transitivity constraints for all chord-free cycles in the graph.Theorem1An assignment to the relational variables will satisfy all of the transitivity con-straints given by Equation1if and only if it satisfies trans.This theorem follows directly from Proposition3and the encoding given by Equation2.3.1Enumerating Chord-Free CyclesTo enumerate the chord-free cycles of a graph,we exploit the following properties.An acyclic path is said to have a chord when there is an edge in such thatwith,and either or.We classify a chord-free path as terminal whenis in,and as extensible otherwise.Proposition4A path is chord-free and terminal if and only if the cycleis chord-free.This follows by noting that the conditions imposed on a chord-free path are identical to those for a chord-free cycle,except that the latter includes a closing edge.A proper prefix of path is a path such that. Proposition5Every proper prefix of a chord-free path is chord-free and extensible.Clearly,any prefix of a chord-free path is also chord-free.If some prefix with were terminal,then any attempt to add the edge would yield either a simple cycle (when),some other cycle(when for some),or a path havingas a chord.Given these properties,we can enumerate the set of all chord-free paths by breadthfirst expan-sion.As we enumerate these paths,we also generate,the set of all chord-free cycles.Defineto be the set of all extensible,chord-free paths having vertices,for.Initially we have,and.Given set,we generate set and add some cycles of length to.For each path,we consider the path for each edge in.When for some,we classify the path as cyclic.When there is an edge in for some,we classify the path as having a chord.When there is an edge in,we add the cycle to.Otherwise,we add the path to.After generating all of these paths,we can use the set to generate the set of all chord-free cycles.For each terminal,chord-free cycle having vertices,there will be members of—each of the edges of the cycle can serve as the closing edge,and a cycle can traverse the closing edge in either direction.To generate the set of clauses given by Equation2,we simply need to choose one element of for each closing edge,e.g.,by considering only cycles for which.As Figure2indicates,there can be an exponential number of chord-free cycles in a graph. In particular,thisfigure illustrates a family of graphs with vertices.Consider the cycles passing through the diamond-shaped faces as well as the edge along the bottom.For each diamond-shaped face,a cycle can pass through either the upper vertex or the lower vertex.Thus there are such cycles.In addition,the edges forming the perimeter of each face create a chord-free cycle,giving a total of chord-free cycles.The columns labeled“Direct”in Table2show results for enumerating the chord-free cycles for our benchmarks.For each correct microprocessor,we have two graphs:one for which transitivity constraints played no role in the verification,and one(indicated with a“t”at the end of the name) modified to require enforcing transitivity constraints.We summarize the results for the transitivity1DLX-C78286858379534842682041182,3939,5721726972,091 2DLX-CA-t3002,3006,9002DLX-CC3002,3006,9001432,1368,3641938582,574 min.2311,5404,620avg.3002,3006,900max.2992,2926,8771205601,680402293,05677982946307,14021,4208465,7721,472,1842064081,2242,01641,664124,9923.2Adding More Relational VariablesEnumerating the transitivity constraints based on the variables in runs the risk of generating a Boolean formula of exponential size.We can guarantee polynomial growth by considering a larger set of relational variables.In general,let be some set of relational variables such that, and let trans be the transitivity constraint formula generated by enumerating the chord-free cycles in the graph.Theorem2If is the set of relational variables in sat and,then the formula sat trans is satisfiable if and only if sat trans is satisfiable.We introduce a series of lemmas to prove this theorem.For a propositional formula over a set of variables and an assignment,define the valuation of under,denoted ,to be the result of evaluating formula according to assignment.Wefirst prove that we can extend any assignment over a set of relational variables to one over a superset of these variables yielding identical valuations for both transistivity constraint formulas.Lemma1For any sets of relational variables and such that,and for any assignment ,such that trans,there is an assignment such that transProof:We consider the case where.The general statement of the proposition then holds by induction on.Define assignment to be:Graph has a path of1-edges from node to node.otherwiseWe consider two cases:1.If,then any cycle in through must contain a0-edge other than.Hence adding this edge does not introduce any transitivity violations.2.If,then there must be some path of1-edges between nodes and in.In order for the introduction of1-edge to create a transitivity violation,there must also be some path between nodes and in containing exactly one0-edge.But then we could concatenate paths and to form a cycle in containing exactly one0-edge,implying that trans.We conclude therefore that adding 1-edge does not introduce any transitivity violations.Lemma2For and for any assignment,such that trans,we also have transProof:We note that any cycle in must be present in and have the same edge labeling.Thus,if has no cycle with a single0-edge,then neither does.We now return to the proof of Theorem2.Proof:Suppose that sat trans is satisfiable,i.e.,there is some assignment such that sat trans.Then by Lemma1we canfind an assignment such that trans.Furthermore,since the construction of by Lemma1preserves the values assigned to all variables in,and these are the only relational variables occurring in sat,we can conclude that sat.Therefore sat trans is satisfiable.Suppose on the other hand that sat trans is satisfiable,i.e.,there is some assignment such that sat trans.Then by Lemma2we also have trans,and hence sat trans is satisfiable.Our goal then is to add as few relational variables as possible in order to reduce the size of the transitivity formula.We will continue to use our path enumeration algorithm to generate the transitivity formula.3.3Dense EnumerationFor the dense enumeration method,let denote the set of variables for all values of and such that.Graph is a complete,undirected graph.In this graph, any cycle of length greater than three must have a chord.Hence our algorithm will enumerate transitivity constraints of the form,for all distinct values of,,and. The graph has edges and chord-free cycles,yielding a total oftransitivity constraints.The columns labeled“Dense”in Table2show the complexity of this method for the benchmark circuits.For the smaller graphs1DLX-C,1DLX-C-t,and,this method yields more clauses than direct enumeration of the cycles in the original graph.For the larger graphs,however, it yields fewer clauses.The advantage of the dense method is most evident for the mesh graphs, where the cubic complexity is far superior to exponential.3.4Sparse EnumerationWe can improve on both of these methods by exploiting the sparse structure of.Like the dense method,we want to introduce additional relational variables to give a set of variables such that the resulting graph becomes chordal[Rose70].That is,the graph has the property that every cycle of length greater than three has a chord.Chordal graphs have been studied extensively in the context of sparse Gaussian elimination.In fact,the problem offinding a minimum set of additional variables to add to our set is identical to the problem offinding an elimination ordering for Gaussian elimination that minimizes the amount offill-in.Although this problem is NP-complete[Yan81],there are good heuristic solutions.InCircuit sat trans sat RatioSatisfiable?Secs.Satisfiable?Secs.N3 1.4 1DLX-C-t N92DLX-CA N1,275Y3N.A.N5,035 2.0 2DLX-CC-t N15,003Full Y10.2Buggy Y125 2.32DLX-CC Y2,18669.4Table3:Performance of FGRASP on Benchmark Circuits.Results are given both without and with transitivity constraints.particular,our implementation proceeds as a series of elimination steps.On each step,we remove some vertex from the graph.For every pair of distinct,uneliminated vertices and such that the graph contains edges and,we add an edge if it does not already exist.The original graph plus all of the added edges then forms a chordal graph.To choose which vertex to eliminate on a given step,our implementation uses the simple heuristic of choosing the vertex with minimum degree.If more than one vertex has minimum degree,we choose one that minimizes the number of new edges added.The columns in Table2labeled“Sparse”show the effect of making the benchmark graphs chordal by this method.Observe that this method gives superior results to either of the other two methods.In our implementation we have therefore used the sparse method to generate all of the transitivity constraint formulas.4SAT-Based Decision ProceduresMost Boolean satisfiability(SA T)checkers take as input a formula expressed in clausal form. Each clause is a set of literals,where a literal is either a variable or its complement.A clause denotes the disjunction of its literals.The task of the checker is to eitherfind an assignment to the variables that satisfies all of the clauses or to determine that no such assignment exists.We can solve the constrained satisfiability problem using a conventional SA T checker by generating a set of clauses trans representing trans and a set of clauses sat representing the formula sat. We then run the checker on the combined clause set sat trans tofind satisfying solutions tosat trans.In experimenting with a number of Boolean satisfiability checkers,we have found that FGRASP [MS99]has the best overall performance.The most recent version can be directed to periodically restart the search using a randomly-generated variable assignment[M99].This is thefirst SA T checker we have tested that can complete all of our benchmarks.All of our experiments wereconducted on a336MHz Sun UltraSPARC II with1.2GB of primary memory.As indicated by Table3,we ran FGRASP on clause sets sat and trans sat,i.e.,both with-out and with transitivity constraints.For benchmarks1DLX-C,2DLX-CA,and2DLX-CC, the formula sat is unsatisfiable.As can be seen,including transitivity constraints increases the run time significantly.For benchmarks1DLX-C-t,2DLX-CA-t,and2DLX-CC-t,the for-mula sat is satisfiable,but only because transitivity is not enforced.When we add the clauses for trans,the formula becomes unsatisfiable.For the buggy circuits,the run times for sat range from under1second to over36minutes.The run times for trans sat range from less than one second to over12hours.In some cases,adding transitivity constraints actually decreased the CPU time(by as much as a factor of5),but in most cases the CPU time increased(by as much as a factor of69).On average(using the geometric mean)adding transitivity constraints increased the CPU time by a factor of2.3.We therefore conclude that satisfiability checking with transitivity constraints is more difficult than conventional satisfiability checking,but the added complexity is not overwhelming.5OBDD-Based Decision ProceduresA simple-minded approach to solving satisfiability with transitivity constraints using OBDDs would be to generate separate OBDD representations of trans and sat.We could then use the A PPLY operation to generate an OBDD for trans sat,and then eitherfind a satisfying assignment or determine that the function is unsatisfiable.We show that for some sets of relational variables,the OBDD representation of trans can be too large to represent and manipulate.In our experiments,we use the CUDD OBDD package with dynamic variable reordering by sifting.5.1Lower Bound on the OBDD Representation of transWe prove that for some sets,the OBDD representation of trans may be of exponential size for all possible variable orderings.As mentioned earlier,the NP-completeness result proved by Goel,et al.[GSZAS98]has implications for the complexity of representing trans as an OBDD.They showed that given an OBDD sat representing formula sat,the task offinding a satisfying assignment of sat that also satisfies the transitivity constraints in is NP-complete in the size of sat.By this,assuming,we can infer that the OBDD representa-tion of trans may be of exponential size when using the same variable ordering as is used in sat.Our result extends this lower bound to arbitrary variable orderings and is independent of the vs.problem.Let denote a planar mesh consisting of a square array of vertices.For example, Figure3shows the graph for.Being a planar graph,the edges partition the plane into faces. As shown in Figure3we label these for.There are a total ofsuch faces.One can see that the set of edges forming the border of each face forms a chord-free cycle of.As shown in Table2,many other cycles are also chord-free,e.g.,the perimeter of any rectangular region having height and width greater than1,but we will consider only the cycles。